[GLLUG] Bash scripting problem

Andy Smith andy at bitfolk.com
Tue May 16 14:28:25 UTC 2017


Hi John,

On Tue, May 16, 2017 at 03:21:44PM +0100, John Levin via GLLUG wrote:
> What would be the best way to pass along to sed two strings like
> "An ad to","An act to" ?

Quote them.

$ echo "An ad to" | sed -e "s/\bad\b/act/g"
An act to

http://wiki.bash-hackers.org/syntax/quoting

Cheers,
Andy

-- 
https://bitfolk.com/ -- No-nonsense VPS hosting



More information about the GLLUG mailing list