1

Insert a line in a file by deleting that line from another file

view story
linux-howto

http://www.unix.com – Hi all, I have a huge file(size more that 5GB). I want to do some manupulation with the records and write to another file. As the size of the file is huge and there is a space constraint in that directory, I want to delete that record from first file after writing it in to second file. Example:- Code: cat first.dat | while read line do echo $line| .........    >> second.dat # Here after writing to second file i want to delete the same record from first.dat done can anyone please help me on this??? thanks in adv.... (HowTos)