<!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: Tahoma;
}
@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
}
SPAN.emailstyle18 {
        COLOR: navy; FONT-FAMILY: Arial
}
SPAN.EmailStyle19 {
        COLOR: navy; FONT-FAMILY: Arial
}
DIV.Section1 {
        page: Section1
}
</STYLE>
</HEAD>
<BODY lang=EN-US vLink=purple link=blue>
<DIV><SPAN class=875373315-04052004><FONT face=Arial color=#0000ff size=2>Can 
you post your script?</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 11:03 AM<BR><B>To:</B> 'General Red Hat Linux discussion 
  list'<BR><B>Subject:</B> RE: Unix Scripting Question<BR><BR></FONT></DIV>
  <DIV class=Section1>
  <P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">Still no luck - 
  </SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"></SPAN></FONT> </P>
  <P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">servername $for foo 
  in `cat bb.lst` ^Jdo^Jecho $foo^Jdone</SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">"/apps/htdocs/afrl/EBS/microsite/8583/COF\</SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">Summary\</SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">Apr03\</SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">v2_2.ppt"</SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">"/apps/htdocs/afrl/EBS/microsite/8583/Century\</SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">of\</SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">Flight\</SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">\</SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">Award\</SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">-\</SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">15Jan03_1.ppt"</SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">servername $cat 
  bb.lst</SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">"/apps/htdocs/afrl/EBS/microsite/8583/COF\ 
  Summary\ Apr03\ v2_2.ppt"</SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">"/apps/htdocs/afrl/EBS/microsite/8583/Century\ 
  of\ Flight\ \ Award\ -\ 15Jan03_1.ppt"</SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"></SPAN></FONT> </P>
  <P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Tahoma size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma">-----Original 
  Message-----<BR><B><SPAN style="FONT-WEIGHT: bold">From:</SPAN></B> 
  redhat-list-bounces@redhat.com [mailto:redhat-list-bounces@redhat.com] 
  <B><SPAN style="FONT-WEIGHT: bold">On Behalf Of </SPAN></B>Dege, Robert 
  C.<BR><B><SPAN style="FONT-WEIGHT: bold">Sent:</SPAN></B> Tuesday, May 04, 
  2004 10:56 AM<BR><B><SPAN style="FONT-WEIGHT: bold">To:</SPAN></B> 'General 
  Red Hat Linux discussion list'<BR><B><SPAN 
  style="FONT-WEIGHT: bold">Subject:</SPAN></B> RE: Unix Scripting 
  Question</SPAN></FONT></P>
  <P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face="Times New Roman" 
  size=3><SPAN style="FONT-SIZE: 12pt"></SPAN></FONT> </P>
  <DIV>
  <P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Arial color=blue 
  size=2><SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Arial">Using 
  sed, you first need to escape the space, and then escape the 
  back-slash.</SPAN></FONT></P></DIV>
  <DIV>
  <P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face="Times New Roman" 
  size=3><SPAN style="FONT-SIZE: 12pt"></SPAN></FONT> </P></DIV>
  <DIV>
  <P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Arial color=blue 
  size=2><SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Arial">(in 
  vi)</SPAN></FONT></P></DIV>
  <DIV>
  <P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face="Times New Roman" 
  size=3><SPAN style="FONT-SIZE: 12pt"></SPAN></FONT> </P></DIV>
  <DIV>
  <P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Arial color=blue 
  size=2><SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Arial">:%s/\ 
  /\\\ /g</SPAN></FONT></P></DIV>
  <DIV>
  <P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face="Times New Roman" 
  size=3><SPAN style="FONT-SIZE: 12pt"></SPAN></FONT> </P></DIV>
  <DIV>
  <P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Arial color=blue 
  size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Arial">-Rob</SPAN></FONT></P></DIV>
  <BLOCKQUOTE 
  style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 4pt; PADDING-BOTTOM: 0in; MARGIN: 5pt 0in 5pt 3.75pt; BORDER-LEFT: blue 1.5pt solid; PADDING-TOP: 0in; BORDER-BOTTOM: medium none">
    <P class=MsoNormal 
    style="MARGIN-BOTTOM: 12pt; MARGIN-LEFT: 0.5in; MARGIN-RIGHT: 0in"><FONT 
    face=Tahoma size=2><SPAN 
    style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma">-----Original 
    Message-----<BR><B><SPAN style="FONT-WEIGHT: bold">From:</SPAN></B> Cupp 
    Michael E Contr AFRL/DIB [mailto:Michael.Cupp@wpafb.af.mil]<BR><B><SPAN 
    style="FONT-WEIGHT: bold">Sent:</SPAN></B> Tuesday, May 04, 2004 10:51 
    AM<BR><B><SPAN style="FONT-WEIGHT: bold">To:</SPAN></B> 'General Red Hat 
    Linux discussion list'<BR><B><SPAN 
    style="FONT-WEIGHT: bold">Subject:</SPAN></B> RE: Unix Scripting 
    Question</SPAN></FONT></P>
    <P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Arial color=navy 
    size=2><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">How 
    would I do that - :g/ /s/\ /g doesn't seem to work.</SPAN></FONT></P>
    <P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face="Times New Roman" 
    size=3><SPAN style="FONT-SIZE: 12pt"></SPAN></FONT> </P>
    <P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face="Times New Roman" 
    size=3><SPAN style="FONT-SIZE: 12pt"></SPAN></FONT> </P>
    <P class=MsoNormal style="MARGIN-LEFT: 1in"><FONT face=Tahoma size=2><SPAN 
    style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma">-----Original 
    Message-----<BR><B><SPAN style="FONT-WEIGHT: bold">From:</SPAN></B> 
    redhat-list-bounces@redhat.com [mailto:redhat-list-bounces@redhat.com] 
    <B><SPAN style="FONT-WEIGHT: bold">On Behalf Of </SPAN></B>Dege, Robert 
    C.<BR><B><SPAN style="FONT-WEIGHT: bold">Sent:</SPAN></B> Tuesday, May 04, 
    2004 10:41 AM<BR><B><SPAN style="FONT-WEIGHT: bold">To:</SPAN></B> 'General 
    Red Hat Linux discussion list'<BR><B><SPAN 
    style="FONT-WEIGHT: bold">Subject:</SPAN></B> RE: Unix Scripting 
    Question</SPAN></FONT></P>
    <P class=MsoNormal style="MARGIN-LEFT: 1in"><FONT face="Times New Roman" 
    size=3><SPAN style="FONT-SIZE: 12pt"></SPAN></FONT> </P>
    <DIV>
    <P class=MsoNormal style="MARGIN-LEFT: 1in"><FONT face=Arial color=blue 
    size=2><SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Arial">Your 
    problem could be that you need to escape the spaces in the file names prior 
    to running your test.</SPAN></FONT></P></DIV>
    <DIV>
    <P class=MsoNormal style="MARGIN-LEFT: 1in"><FONT face="Times New Roman" 
    size=3><SPAN style="FONT-SIZE: 12pt"></SPAN></FONT> </P></DIV>
    <DIV>
    <P class=MsoNormal style="MARGIN-LEFT: 1in"><FONT face=Arial color=blue 
    size=2><SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Arial">Modify 
    your a.lst file & replace all spaces ' ' with slash space '\ 
    '</SPAN></FONT></P></DIV>
    <DIV>
    <P class=MsoNormal style="MARGIN-LEFT: 1in"><FONT face="Times New Roman" 
    size=3><SPAN style="FONT-SIZE: 12pt"></SPAN></FONT> </P></DIV>
    <DIV>
    <P class=MsoNormal style="MARGIN-LEFT: 1in"><FONT face=Arial color=blue 
    size=2><SPAN 
    style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Arial">-Rob</SPAN></FONT></P></DIV>
    <BLOCKQUOTE 
    style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 4pt; PADDING-BOTTOM: 0in; MARGIN: 5pt 0in 5pt 3.75pt; BORDER-LEFT: blue 1.5pt solid; PADDING-TOP: 0in; BORDER-BOTTOM: medium none">
      <P class=MsoNormal 
      style="MARGIN-BOTTOM: 12pt; MARGIN-LEFT: 1in; MARGIN-RIGHT: 0in"><FONT 
      face=Tahoma size=2><SPAN 
      style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma">-----Original 
      Message-----<BR><B><SPAN style="FONT-WEIGHT: bold">From:</SPAN></B> Cupp 
      Michael E Contr AFRL/DIB [mailto:Michael.Cupp@wpafb.af.mil]<BR><B><SPAN 
      style="FONT-WEIGHT: bold">Sent:</SPAN></B> Tuesday, May 04, 2004 10:26 
      AM<BR><B><SPAN style="FONT-WEIGHT: bold">To:</SPAN></B> 
      'redhat-list@redhat.com'<BR><B><SPAN 
      style="FONT-WEIGHT: bold">Subject:</SPAN></B> Unix Scripting 
      Question</SPAN></FONT></P>
      <P class=MsoNormal style="MARGIN-LEFT: 1in"><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:875373315@04052004-304e" width=16 
      border=0></SPAN></FONT></P>
      <P class=MsoNormal style="MARGIN-LEFT: 1in"><FONT face="Times New Roman" 
      size=3><SPAN 
  style="FONT-SIZE: 12pt"></SPAN></FONT> </P></BLOCKQUOTE></BLOCKQUOTE><!-- / message --></DIV></BLOCKQUOTE></BODY></HTML>