LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] Moving chars about within lines

[ILUG] Moving chars about within lines

Mark McLoughlin mark at skynet.ie
Mon Apr 2 14:56:05 IST 2001


On Mon, 2 Apr 2001, Padraig Brady wrote:

> Nope the ' ' quotes stop the shell interpreting them.
> The \'s are required by sed.
>
> Padraig.

Just to elaborate - 'cause somebody might find it interesting, I did ;)
 - this is all down to the different 'syntax bits' used by sed, awk,
grep etc.

I've tried looking for the manual with the good explanation on this
that I found a while back - but I can't find it.... :(

But, if you look at /usr/include/regex.h, you'll find RE_SYNTAX_SED
defined and if you trace this back and look at all the syntax bits
defined for this you'll see exactly what needs to be escaped and what
doesn't.

So for sed, you need to escape '{','(','}' and ')' to give them their
special meaning 'cause RE_NO_BK_PARENS and RE_NO_BK_BRACES are not a
part of the RE_SYNTAX_SED syntax.

Good Luck,
Mark





More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell