Hi!
On Tue, Apr 11, 2000 at 04:59:58PM -0400, Katherine Ellis wrote:
> echo "machine {NAME}" | sed s/{NAME}/`uname`/g
Try quoting the argument to sed. If uname echos a space or any shell
wildcard, the call to sed will break. (*) Also, add a -e just to be on
the safe side:
echo "machine {NAME}" | sed -e "s/{NAME}/`uname`/g"
Ciao
Thomas
(*) For example, if uname returned 'foo bar' (without the quotes), the
actual call to sed would be
sed s/{NAME}/foo bar/g
This are _two_ parameters, and not just the one intented.
--
Thomas Binder (Gryf @ IRCNet) gryf@hrzpub.tu-darmstadt.de
PGP-key available on request! binder@rbg.informatik.tu-darmstadt.de
Attachment:
pgpJsHaxVKnqP.pgp
Description: PGP signature