Re: Bug or unwanted behaviour in echo ?

From: Jelte Jansen <jelte_at_NLnetLabs.nl>
Date: Thu, 08 Jan 2009 14:15:25 +0100
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Damien Fleuriot wrote:
> 
> After swapping characters around I realized that echo just interprets
> $_at_ (which in our case is null).
> 

that's your shell doing the replacement, not echo.

With most most shells you can inhibit this behaviour by using single
quotes. Escaping the _at_ should work in some cases too.

$ echo "abc$_at_"
abc
$ echo 'abc$_at_'
abc$_at_

Jelte
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (FreeBSD)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkll/G0ACgkQ4nZCKsdOncUSSQCeJuQZi1h+TrKNyxpHmu6hjykO
+mAAnjKGHk76zsyTwwaahKbFWHQvjf1E
=wJHv
-----END PGP SIGNATURE-----
Received on Thu Jan 08 2009 - 12:15:34 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:40 UTC