<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1400" name=GENERATOR>
<STYLE>@font-face {
font-family: Verdana;
}
@page Section1 {size: 8.5in 11.0in; margin: 1.0in 1.25in 1.0in 1.25in; }
P.MsoNormal {
FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"
}
LI.MsoNormal {
FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"
}
DIV.MsoNormal {
FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"
}
A:link {
COLOR: blue; TEXT-DECORATION: underline
}
SPAN.MsoHyperlink {
COLOR: blue; TEXT-DECORATION: underline
}
A:visited {
COLOR: purple; TEXT-DECORATION: underline
}
SPAN.MsoHyperlinkFollowed {
COLOR: purple; TEXT-DECORATION: underline
}
SPAN.EmailStyle17 {
COLOR: windowtext; FONT-FAMILY: Arial
}
DIV.Section1 {
page: Section1
}
</STYLE>
</HEAD>
<BODY lang=EN-US vLink=purple link=blue>
<DIV><SPAN class=135563014-04052004><FONT face=Arial color=#0000ff size=2>Your
problem could be that you need to escape the spaces in the file names prior to
running your test.</FONT></SPAN></DIV>
<DIV><SPAN class=135563014-04052004><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=135563014-04052004><FONT face=Arial color=#0000ff size=2>Modify
your a.lst file & replace all spaces ' ' with slash space '\
'</FONT></SPAN></DIV>
<DIV><SPAN class=135563014-04052004><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=135563014-04052004><FONT face=Arial color=#0000ff
size=2>-Rob</FONT></SPAN></DIV>
<BLOCKQUOTE dir=ltr
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B> Cupp Michael E Contr
AFRL/DIB [mailto:Michael.Cupp@wpafb.af.mil]<BR><B>Sent:</B> Tuesday, May 04,
2004 10:26 AM<BR><B>To:</B> 'redhat-list@redhat.com'<BR><B>Subject:</B> Unix
Scripting Question<BR><BR></FONT></DIV>
<DIV class=Section1>
<P class=MsoNormal><FONT face=Verdana color=black size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Verdana">I have a file
(a.lst) that has a list of fully pathed filenames, 1 per line - in this
format:<BR><BR>"/path/to/the/name_of_file.doc"<BR>"/path/to/the/other/name of
the doc noting spaces.doc"<BR><BR>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 -<BR><BR>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)<BR><BR><BR>Thanks again,<BR>Michael <IMG
class=inlineimg title=cool height=16 src="cid:135563014@04052004-3040"
width=16 border=0></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"></SPAN></FONT> </P><!-- / message --></DIV></BLOCKQUOTE></BODY></HTML>