Ok... Gracias a los que me contestaron..., me quedo asi:

#!/bin/sh

        for user in `cat /tmp/excedidos` {
do
        grep ^$user /etc/passwd | awk -F: '{print $5"-->"$1}' 
done


El mar, 20-05-2003 a las 15:58, Hue-Bond escribi�:
> Saxa Egea, [EMAIL PROTECTED]:49:33(+0200):
> >
> >             cat /etc/passwd | grep -v grep | grep ^$user | awk -F\# {'print 
> > $5'}
> 
> Dir�a que el "grep -v grep" aqu� no es necesario ya que esto no es un
> listado de procesos. Adem�s, todav�a se puede uno ahorrar un proceso m�s
> eliminando el cat:
> 
> grep ^$user /etc/passwd | awk -F\# {'print $5'}
> 
> 
> -- 
>  David Serrano - Linux Registered User #87069
> 
> 
> -- 
> To UNSUBSCRIBE, email to [EMAIL PROTECTED]
> with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]


Responder a