On Sun, 2012-02-26 at 03:30 +0100, Jakub Wilk wrote:
> * Jari Aalto <[email protected]>, 2012-02-08, 02:58:
> >-    [ "`head -n 1 \"$1\"`" = "-----BEGIN PGP SIGNED MESSAGE-----" ] || \
> >+    [ "$(head -n 1 \"$1\")" = "-----BEGIN PGP SIGNED MESSAGE-----" ] || \
> 
> Bzzt, wrong.
> 
> $ foo=/etc/ld.so.conf; echo "`head -n 1 \"$foo\"`"
> include /etc/ld.so.conf.d/*.conf
> 
> $ foo=/etc/ld.so.conf; echo "$(head -n 1 \"$1\")"
> head: cannot open `""' for reading: No such file or directory

fwiw, it breaks even if you remember to use the right variable in the
second example... ;-)

$ foo=/etc/ld.so.conf; echo "$(head -n 1 \"$foo\")"
head: cannot open `"/etc/ld.so.conf"' for reading: No such file or directory

Regards,

Adam





-- 
To unsubscribe, send mail to [email protected].

Reply via email to