On Tue, 30 Sep 2003, Brad De Vries wrote:

> Thanks for going Off Topic on this, my head was
> starting to hurt from reading the other posts.  I
> think it might have been withdrawl symptoms.
> 
> Anyway, to pass assignmment values into an awk script,
> use the -v option:
> 
> for i in `awk -F: ' ($3 > 99) && ($3 < 65530) { print
> $1}' /etc/passwd`;
> do
>   awk -F: -v name=$i '$1 == name {print $0}'
> /etc/gshadow >> /tmp/gshadow
>   awk -F: -v name=$i '$1 == name {print $0}'
> /etc/group   >> /tmp/group
>   awk -F: -v name=$i '$1 == name {print $0}'
> /etc/shadow  >> /tmp/shadow
> done
> 
> HTH,

Sorry it doesn't.  The code I posted works and apparently is legal, so 
says Dale Dougherty.  Either way is acceptable.





_______________________________________________
Linux-users mailing list
[EMAIL PROTECTED]
Unsubscribe/Suspend/Etc -> http://smtp.linux-sxs.org/mailman/listinfo/linux-users

Reply via email to