Thread
:
Just playing
View Single Post
Aug 28th, 2006, 10:19 AM
#
3
jim mcnamara
Hobbyist Programmer
Join Date: Jun 2005
Location: New Mexico
Posts: 228
Rep Power:
4
> file
truncates (sets the file pointer to the start of an empty file) a file.
It happens before grep runs. Grumpy gave you the workaround.
(
Toggle Plain Text
)
grep 'stuff ' file1 > tmpfile mv tmpfile file1
grep 'stuff ' file1 > tmpfile mv tmpfile file1
jim mcnamara
View Public Profile
Find More Posts by jim mcnamara