On Sun, 2012-02-26 at 03:30 +0100, Jakub Wilk wrote:
> * Jari Aalto <jari.aa...@cante.net>, 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, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to