sed script question
David Thornton
david-FkEgs2FKm2NvBvnq28/GKQ at public.gmane.org
Tue Jan 18 05:11:15 UTC 2005
try this:
sed "s/\[/ /g"
Enclose the whole thing in quotes and use \ as you escape of any special
meaninf of [.
Single ticks also work in this case.
sed 's/\[/ /g'
Cool
jim ruxton wrote:
>I'm trying to write a script and in it one of the things I want to do is
>get rid of [ characters. When I try using sed as in:
>sed s/"["/" "/g
>I get an error message saying it is an unterminated s command. I have a
>feeling this is because [ is a special character. I thought however
>putting quotes around it would take care of this. Any thoughts on what
>I'm doing wrong? Thanks.
>Jim
>
>--
>The Toronto Linux Users Group. Meetings: http://tlug.ss.org
>TLUG requests: Linux topics, No HTML, wrap text below 80 columns
>How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml
>
>
--
The Toronto Linux Users Group. Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml
More information about the Legacy
mailing list