[lug] Changing files on-the-fly - No consensus here

Zan Lynx zlynx at acm.org
Wed Sep 17 13:41:12 MDT 2003


On Tue, 2003-09-16 at 11:17, Paul E Condon wrote:
[snip]
> Try this:
> 
> cat numbers.txt | egrep -v three >numbers.txt
> 
> Of course there really IS a temp file in the pipe, but you don't have
> to create it explicitly

No!  Don't do this!
A pipe is not a temporary file.  It is a 4K piece of memory.  If
numbers.txt is larger than 4K, or if your system is dual processor, this
pipe will erase numbers.txt while it is being read.
-- 
Zan Lynx <zlynx at acm.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.lug.boulder.co.us/pipermail/lug/attachments/20030917/4c8d7365/attachment.pgp>


More information about the LUG mailing list