Unix Scripting Question

Cupp Michael E Contr AFRL/DIB Michael.Cupp at wpafb.af.mil
Tue May 4 14:25:58 UTC 2004


I have a file (a.lst) that has a list of fully pathed filenames, 1 per line - in this format:

"/path/to/the/name_of_file.doc"
"/path/to/the/other/name of the doc noting spaces.doc"

I need to know how I can loop through this file, a.lst, and for each entry, perform a test -s on it. If it exists, I want to put the entry into exists.txt, if it does not, I want to put the entry in noexist.txt -

Can someone please help me? (I've tried for foo in `cat a.lst`, but due to the spaces in 90% of the filenames, it pukes, as it appears to be using space as the delimiter)


Thanks again,
Michael 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/redhat-list/attachments/20040504/fbe9721c/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.gif
Type: image/gif
Size: 1063 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/redhat-list/attachments/20040504/fbe9721c/attachment.gif>


More information about the redhat-list mailing list