Just a thought on sed

Nicholas Dille darkyeti at gmx.net
Mon May 6 01:17:21 PDT 2002

On Sun, May 05, 2002 at 09:19:06PM -0600, Rob 'Feztaa' Park wrote:
> Alas! Nicholas Dille spake thus:
> > try the following line:
> > 
> > 	# echo "foo`temp'bar"
> That's why you'd do something like this instead:
>     $ echo foo\`temp\'bar

the point of all this was that i said that the command

	# echo "$(sed 's/foo/bar/' file)" > file

could fail because file might contain ` and ' to delimit strings.
on the command line one would certainly use backslashes to prevent this.


rakshas at quietude / 7793747 / rakshas dot de
Unsubscribe: send email to listar at linuxfromscratch.org
and put 'unsubscribe lfs-dev' in the subject header of the message

More information about the lfs-dev mailing list