Still no luck -
servername $for foo in `cat bb.lst` ^Jdo^Jecho
$foo^Jdone
"/apps/htdocs/afrl/EBS/microsite/8583/COF\
Summary\
Apr03\
v2_2.ppt"
"/apps/htdocs/afrl/EBS/microsite/8583/Century\
of\
Flight\
\
Award\
-\
15Jan03_1.ppt"
servername $cat bb.lst
"/apps/htdocs/afrl/EBS/microsite/8583/COF\
Summary\ Apr03\ v2_2.ppt"
"/apps/htdocs/afrl/EBS/microsite/8583/Century\
of\ Flight\ \ Award\ -\ 15Jan03_1.ppt"
-----Original Message-----
From: redhat-list-bounces@xxxxxxxxxx
[mailto:redhat-list-bounces@xxxxxxxxxx] On
Behalf Of Dege, Robert C.
Sent: Tuesday, May 04, 2004 10:56
AM
To: 'General Red Hat Linux
discussion list'
Subject: RE: Unix Scripting
Question
Using sed, you first need
to escape the space, and then escape the back-slash.
-----Original
Message-----
From: Cupp Michael E Contr
AFRL/DIB [mailto:Michael.Cupp@xxxxxxxxxxxx]
Sent: Tuesday, May 04, 2004 10:51
AM
To: 'General Red Hat Linux
discussion list'
Subject: RE: Unix Scripting
Question
How would I do that - :g/
/s/\ /g doesn't seem to work.
-----Original Message-----
From:
redhat-list-bounces@xxxxxxxxxx [mailto:redhat-list-bounces@xxxxxxxxxx] On Behalf Of Dege, Robert C.
Sent: Tuesday, May 04, 2004 10:41
AM
To: 'General Red Hat Linux
discussion list'
Subject: RE: Unix Scripting
Question
Your
problem could be that you need to escape the spaces in the file names prior to running
your test.
Modify
your a.lst file & replace all spaces ' ' with slash space '\ '
-----Original
Message-----
From: Cupp Michael E Contr
AFRL/DIB [mailto:Michael.Cupp@xxxxxxxxxxxx]
Sent: Tuesday, May 04, 2004 10:26
AM
To: 'redhat-list@xxxxxxxxxx'
Subject: Unix Scripting Question
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