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] Another Scripting Question...

[ILUG] Another Scripting Question...

Brian Foster blf at blf.utvinternet.ie
Sat Jul 30 10:29:43 IST 2005


  | From: Conall O'Brien <conall+ilug at conall.net>
  | Date: Fri, 29 Jul 2005 12:02:29 +0100
  | 
  | On Fri, Jul 29, 2005 at 11:50:13AM IST, A. Dreyer <adreyer at math.uni-paderborn.de> incoherently babbled:
  |  > sed -e 's/notify yes;/notify no;@masters { $IP; }/' | tr '@' '\n'
  |[ ... ]
  | I wonder is there a way purely using sed though.

 there is.
 do the obvious:

    sed -e 's/notify yes;/notify no;\
    masters { $IP; }/'

 note that the newline is escaped _and_ that argument
 is enclosed in 'single'-quotes.  why both are needed
 (or at least recommended) is left as an exercise to
 the reader.

cheers!
	-blf-
-- 
Experienced (20+ yrs) kernel/software Eng: | Brian Foster   Montpellier,
 • Unix, embedded, &tc;  • Linux;  • doc;  | blf at utvinternet.ie   FRANCE
 • IDL, automated testing, process, &tc.   |  Stop E$$o (ExxonMobile)!
Résumé (CV) http://www.blf.utvinternet.ie  |     http://www.stopesso.com



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