dirinst comparing "X$action" with "Xdirinst" instead of $action with "dirinst"

Holger Levsen debian at layer-acht.org
Mon Oct 2 12:10:59 CEST 2006


Hi,

On Monday 02 October 2006 11:25, you wrote:
>     > if [ X$action = Xdirinst ]; then
>
> This is normal shell coding practice. It helps if $action is not defined
> at all. Then the test without quotes "" around an undefined variable
> will give a syntax error.

Ah :)

But isn't 

if [ "$action" = "dirinst" ]; then


the same and easier to read?


regards,
	Holger
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.uni-koeln.de/pipermail/linux-fai-devel/attachments/20061002/eec1b34e/attachment.bin 


More information about the linux-fai-devel mailing list