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] RE: sed people ?

[ILUG] RE: sed people ?

Stephen_Reilly at dell.com Stephen_Reilly at dell.com
Mon Feb 14 08:57:34 GMT 2000


> On Fri, 11 Feb 2000 20:02:33 -0000 "Kenn Humborg" <kenn at bluetree.ie>
> wrote:
> | > sed 's/ *| */|/g' file | cat > file
> 
> | > surely ??
> 
> | Is that _guaranteed_ not to truncate 'file' before sed
> | reads it?
> 
well, yes it should do, because its handing the output to cat before being
piped back into itself . . . now of course thats down to how much info cat
can hold . . . but you certainly shouldn't see sed overwrite the file it's
trying to parse


--steve

> For extra fun, what happens if you try
> 	sed 's/ *| */|/g' file | cat >> file
> Once upon a time, when patches to the kernel weren't quite as stable, I 
> used to run script, run the patch, close the shell and glance through the 
> typescript to spot any problems. Except once I forgot Ctrl-D. For extra 
> stupid points, use cat instead of less.....
> 	Paul
> 




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