This one time, at band camp, Frans Pop said: > Also: > + if [ "X$pvdev_found" = 'Xyes' ]; then > The X is not needed. The shell handles empty variables correctly if they > have double quotes around them. Also, the quotes around "yes" are not > needed (as it is a single word and not a variable). This is an old, but relatively useful, method of catching garbage in a variable. Imagine if $pvdev_found expands to '-z' - the test will blow up and the script will exit. With the prefix test, you can continue, although admittedly, not much useful will happen, except perhaps garbage collection and error recovery. -- ----------------------------------------------------------------- | ,''`. Stephen Gran | | : :' : sgran@debian.org | | `. `' Debian user, admin, and developer | | `- http://www.debian.org | -----------------------------------------------------------------
Attachment:
signature.asc
Description: Digital signature