[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: escape characters in sed



Alex Samad wrote:
On Mon, May 14, 2007 at 08:59:49AM -0700, Bob McGowan wrote:
Hans du Plooy wrote:
william pursell wrote:
Your version is missing the final ', so I'm guessing you
meant: sed 's/\\)/ /'
Yes, sorry, several mistakes on my part...

which will replace occurences
of "\)" with a single space
Not what I had intended, I just wanted to replace ) with a space. Actually I wanted to replace the ( with a space and get rid of the trailing ),
So, you'd want to use:

  sed -e 's/(/ /' -e 's/)//'

any reason not to do
sed -e 's/(/ /;s/)//'

---XXX---

No, except perhaps clarity. And, the fact I was not aware that you could do it that way. ;)

Bob

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature


Reply to: