[TriLUG] possible awk/grep question

Joseph Mack NA3T jmack at wm7d.net
Thu Jan 17 14:17:40 EST 2008


On Thu, 17 Jan 2008, Rodney Radford wrote:

>
> This should work for you:
>
> ssh $machine cat /etc/passwd | (while read USR F2 F3 GID F5; do
>       if [ $GID -eq 100 ]; then
>               echo $USR
>       fi
> done)

On thinking about Brian's change of syntax I found this 
worked

ssh $machine cat /etc/passwd | while read line
do
         echo $line
done

which is exactly your construction.

any idea why I can't get the original version to work?

Thanks Joe

-- 
Joseph Mack NA3T EME(B,D), FM05lw North Carolina
jmack (at) wm7d (dot) net - azimuthal equidistant map
generator at http://www.wm7d.net/azproj.shtml
Homepage http://www.austintek.com/ It's GNU/Linux!



More information about the TriLUG mailing list