ls -la s* | awk '{print $9}' | sed "s/^./grep -i \'&/g" | sed "s/$/\'
file/g" > srcipt.sh
is really evil looking

steve

-----Original Message-----
From: Marco Shaw [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 14, 2000 12:32 AM
To: [EMAIL PROTECTED]
Subject: Re: scripting help / question


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

----- Original Message -----
From: "Ed Lazor" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, November 13, 2000 8:32 PM
Subject: scripting help / question


> How can I take output from an awk command and run a command on each line?
>
> For example:
>
> ls -la s* | awk '{print $9}'
>
> would create several lines of output and I'd like to do something like
grep
> the lines from a file.
>
> Any ideas?
>
> Thanks =)
>
> -Ed
>
>
>
> _______________________________________________
> Redhat-list mailing list
> [EMAIL PROTECTED]
> https://listman.redhat.com/mailman/listinfo/redhat-list
>



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



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

Reply via email to