The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #3 (permalink)  
Old 02-11-2009
bjawasa bjawasa is offline
Registered User
  
 

Join Date: Feb 2009
Posts: 3
Thanks Hari for your quick reply. But the command that you suggested appended the tempfile. As I mentioned "file*" is being overwritten and what I need to capture is the latest content of 'file*' before it is deleted, without being appended to tempfile.

The command that I used earlier -> while true; do cat file* > tempfile; done; or
while true; do cat file* > tempfile 2>/dev/null; done;
doesn't write anything into tempfile.