<!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
}
SPAN.EmailStyle20 {
        COLOR: navy; FONT-FAMILY: Arial
}
DIV.Section1 {
        page: Section1
}
</STYLE>
</HEAD>
<BODY lang=EN-US vLink=purple link=blue>
<DIV><SPAN class=266024815-04052004><FONT face=Arial color=#0000ff size=2>In 
vi,</FONT></SPAN></DIV>
<DIV><SPAN class=266024815-04052004><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=266024815-04052004><FONT face=Arial color=#0000ff size=2>:%s/\ 
$//g</FONT></SPAN></DIV>
<DIV><SPAN class=266024815-04052004><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=266024815-04052004><FONT face=Arial color=#0000ff size=2>The $ 
represents the end of the line.</FONT></SPAN></DIV>
<DIV><SPAN class=266024815-04052004><FONT face=Arial color=#0000ff size=2>The ^ 
represents the beginning of the line.</FONT></SPAN></DIV>
<DIV><SPAN class=266024815-04052004><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=266024815-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 11:43 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">The scipt was the 
  command line shown below.</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">I have received a 
  suggestion from Chris P. (THANKS, Chris) to use the perl script shown below - 
  the problem is that my a.lst as used for input is formatted like 
  this:</SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">"/path/to/file/file 
  name.doc"                                 
  </SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">"/path/to/file/file 
  name.doc"                            
       </SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">"/path/to/file/file 
  name.doc"                                 
  </SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">"/path/to/file/file 
  name.doc"                                 
  </SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">"/path/to/file/file 
  name.doc"                            
       </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"></SPAN></FONT> </P>
  <P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">The problem with my 
  a.lst is that after the closing ", there may or may not be trailing white 
  space.  If there is, it's not allowing the match, and therefore the 
  compare fails.</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"></SPAN></FONT> </P>
  <P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">Any ideas how to get 
  perl to ignore white space after the closing " or how I can strip this off the 
  end.  (BUT NOT OUT OF THE MIDDLE - some of my file names in the a.lst are 
  file ::SPACE:: ::SPACE:: :SPACE:: name.doc - or similar.</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"></SPAN></FONT> </P>
  <P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">Thanks,</SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">M</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"></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">Chris' script 
  here:</SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">#!/usr/bin/perl</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">$a = 
  '/export/home/oracle/a.lst';</SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">open(FILE, $a) or die 
  "Can't open file: $!\n";</SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">@lines = 
  <FILE>;</SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">close 
  FILE;</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">$exists = 
  '/export/home/oracle/exists.txt';</SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">open(EXISTS, 
  ">$exists") or die "Couldn't open exists.txt for writing: 
  $!\n";</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">$nonexist = 
  '/export/home/oracle/nonexist.txt';</SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">open(NONEXIST, 
  ">$nonexist") or die "Couldn't open nonexists.txt for</SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">writing: 
  $!\n";</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">foreach (@lines) 
  {</SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">  $_ =~ 
  s/"//g;</SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">  
  chomp;</SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">  if (-e $_) 
  {</SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">    
  print "$_ exists\n";</SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">    
  print EXISTS "$_\n";</SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">  } else 
  {</SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">    
  print "$_ doesn't exist\n";</SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">    
  print NONEXIST "$_\n";</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">}</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">close 
  EXISTS;</SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">close 
  NONEXISTS;</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"></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 11:34 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">Can you 
  post your script?</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 11:03 
    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">Still 
    no luck - </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=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 style="MARGIN-LEFT: 0.5in"><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 style="MARGIN-LEFT: 0.5in"><FONT face=Arial color=navy 
    size=2><SPAN 
    style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">Summary\</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">Apr03\</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">v2_2.ppt"</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">"/apps/htdocs/afrl/EBS/microsite/8583/Century\</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">of\</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">Flight\</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">\</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">Award\</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">-\</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">15Jan03_1.ppt"</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">servername $cat 
    bb.lst</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">"/apps/htdocs/afrl/EBS/microsite/8583/COF\ 
    Summary\ Apr03\ v2_2.ppt"</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">"/apps/htdocs/afrl/EBS/microsite/8583/Century\ 
    of\ Flight\ \ Award\ -\ 15Jan03_1.ppt"</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: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: 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">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: 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">(in 
    vi)</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">:%s/\ 
    /\\\ /g</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: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: 1in"><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: 1in"><FONT face="Times New Roman" 
      size=3><SPAN style="FONT-SIZE: 12pt"></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>
      <P class=MsoNormal style="MARGIN-LEFT: 1.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: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: 1.5in"><FONT face="Times New Roman" 
      size=3><SPAN style="FONT-SIZE: 12pt"></SPAN></FONT> </P>
      <DIV>
      <P class=MsoNormal style="MARGIN-LEFT: 1.5in"><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: 1.5in"><FONT face="Times New Roman" 
      size=3><SPAN style="FONT-SIZE: 12pt"></SPAN></FONT> </P></DIV>
      <DIV>
      <P class=MsoNormal style="MARGIN-LEFT: 1.5in"><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: 1.5in"><FONT face="Times New Roman" 
      size=3><SPAN style="FONT-SIZE: 12pt"></SPAN></FONT> </P></DIV>
      <DIV>
      <P class=MsoNormal style="MARGIN-LEFT: 1.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: 1.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: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: 1.5in"><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:266024815@04052004-3055" width=16 
        border=0></SPAN></FONT></P>
        <P class=MsoNormal style="MARGIN-LEFT: 1.5in"><FONT 
        face="Times New Roman" size=3><SPAN 
        style="FONT-SIZE: 12pt"></SPAN></FONT> </P></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE><!-- / message --></DIV></BLOCKQUOTE></BODY></HTML>