[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Regular expression replacement in SED.
On Wed, 5 Apr 2000, Robert Speed wrote:
> So, what I have in the script is the following;
>
> SedCommand=\'s\/%NAME%\/$Recipient\/\'
Have you tried double quotes? I'm not sure what bash's position on it is,
but zsh definitely likes double quotes, and zsh is supposed to be more or
less bashish...
> echo sed $SedCommand $InputDoc \> $DocToSend
Ooh... I know. Single or double quotes around $SedCommand in this bit
perhaps?
> sed $SedCommand $InputDoc > $DocToSend
Or even better, this line... <g>
> Anyone any ideas ???
Shotgun debugging - the art of placing "", '', and \ in various places until
it works... Then trying to work out why... <g>
Works well for shell scripting, I find, since there's no compiler to give
decent diagnostics.
--
-----------------------------------------------------------------------
#include <disclaimer.h>
Matthew Palmer
mjp16@uow.edu.au
---------------------------------------------------------------------
Sheffield Linux User's Group - http://www.sheflug.co.uk
To unsubscribe from this list send mail to
- <sheflug-request [at] vuw.ac.nz> - with the word
"unsubscribe" in the body of the message.
GNU the choice of a complete generation.