At 08:31 PM 11/13/2000 -0400, you wrote:
>You might have to be more specific on your goal.  find with -exec will be
>able to do certain things on files, and a for loop will also be able do
>things to a list.
>
>Marco

k,  here goes:

- first program creates a bunch of output like this

         ### Filename: /root/.addressbook
         ### No such file or directory
         ### Continuing...
         ### Warning: File system error.
         ### Filename: /root/.Xauthority
         ### No such file or directory
         ### Continuing...
         ### Warning: File system error.
         ### Filename: /root/.ICEauthority
         ### No such file or directory

- step two, I pipe this to  `grep Filename` and end up with this:

         ### Filename: /root/.addressbook
         ### Filename: /root/.Xauthority
         ### Filename: /root/.ICEauthority

- step three, I use awk to parse out just the name of the
   file with this command
         awk `{print $3}`

   and end up with this:

         /root/.addressbook
         /root/.Xauthority
         /root/.ICEauthority

- step 4, now the goal is to run a command and use each line as 
parameter.  something like this:

         grep -v "line from previous" tempfile.txt > tempfile.txt


In this particular case, tempfile.txt is a data file used by the original 
program.  It contains a list of files to process.  The program reports 
which files aren't available and I want to remove these entries from the 
data file.  It's just the jump from the last part that I'm stuck on.  Any 
ideas?

-Ed

ps... so far, the only idea I've come up with is to change the awk command 
to something like this (I know formatted like this it won't work, but you 
get the idea):

         awk `{print grep -v "$3" tempfile.txt > tempfile.txt}` > 
tempcommands.txt




_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to