Unix Shell - Re: How to pull current directory entry out of a grep which uses

This is Interesting: Free IT Magazines  
Home > Archive > Unix Shell > October 2006 > Re: How to pull current directory entry out of a grep which uses





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Re: How to pull current directory entry out of a grep which uses
Jon LaBadie

2006-10-23, 7:21 pm

printdude1968@gmail.com wrote:
> I have a ksh for loop which uses the following line as its iterator
>
> for requiredExecutable in $(grep whatever ${foo}.@(BAR|QUIP) | awk -F\"
> '{print $2}'| grep -v "NOT_THIS" | grep -v "NOT_THIS_EITHER" | sort
> -u)
>
>
>
> What I need to know is, can I add a line to the loop so that I will
> pull the ${foo}.@(BAR|QUIP) out
> so that I know which I am looking at? There are only two
> possibilities, but I am interested in logging which one I am checking.
>
> Any ideas?
>


for requiredExecutable in $(
grep whatever ${foo}.@(BAR|QUIP) | tee fromgrep1 |
awk -F\" '{print $2}'| tee fromawk |
grep -v "NOT_THIS" | tee fromgrep2 |
grep -v "NOT_THIS_EITHER" | tee fromgrep3 |
sort -u
)
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com