shell script

Giorgos Keramidas keramida at ceid.upatras.gr
Tue Oct 5 18:02:18 PDT 2004


On 2004-10-05 12:23, Brent Bailey <misterb at bmyster.com> wrote:
> i need to write a for-loop that will read the 1st line in a aliase file
> and grep a passwd file for that user...if that user doesnt exsist in the
> passwd file go the 2nd line and grep the passwd file for that user ...and
> so on
>
> anyone have any suggestions ?

: cat /etc/mail/aliases | \
: while read line ;do
:     echo $line
: done

But as someone else suggested Perl is a lot better for this task.



More information about the freebsd-questions mailing list