How about this? echo test > test.txt.tmp ; cat test.txt test.txt.tmp > test.txt
> -----Original Message----- > From: Joachim Breuer [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, April 10, 2002 11:21 AM > To: [EMAIL PROTECTED] > Subject: Re: How do you pipe text to the top of a file? > > > "Ross Cooney" <[EMAIL PROTECTED]> writes: > > > echo test >> test.txt > > > > appends the word "test" at the bottom of a file called "test.txt" > > > > How do you pipe text to the top of a file? > > However you do it - it requires physically moving all data already in > the file, so in the general case it will never perform particularly > well. - If you really think you need this rather try to rethink the > design and get by with overwrite/append; these operations do not > require physical copy/move of *the whole file*. > > Perhaps you could tell more of what you're trying to achieve in the > big picture? > > > So long, > Joe > > -- > "I use emacs, which might be thought of as a thermonuclear > word processor." > -- Neal Stephenson, "In the beginning... was the command line" > > > > _______________________________________________ > Redhat-list mailing list > [EMAIL PROTECTED] > https://listman.redhat.com/mailman/listinfo/redhat-list > _______________________________________________ Redhat-list mailing list [EMAIL PROTECTED] https://listman.redhat.com/mailman/listinfo/redhat-list