How to say this in Bash?

Matthew Seaman m.seaman at
Mon May 25 17:16:50 UTC 2009

Unga wrote:
> --- On Mon, 5/25/09, Matthew Seaman <m.seaman at> wrote:

> Here is what happens in bash shell:
> $ echo "${X}" > ${Z}
> bash: ${Z}: ambiguous redirect

So, what's the value of ${Z}?  Unless that expands to something that
could be a valid file name you'll get an error message of some sort.

hint: add

  set -x

somewhere towards the top of the script and it will print a lot of debug
output as it runs.



Dr Matthew J Seaman MA, D.Phil.                   7 Priory Courtyard
                                                  Flat 3
PGP:     Ramsgate
                                                  Kent, CT11 9PW

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 259 bytes
Desc: OpenPGP digital signature
Url :

More information about the freebsd-questions mailing list