[ale] another scripting question

Mike Fletcher fletch at phydeaux.org
Wed Dec 1 16:06:46 EST 1999


>>>>> "Zhongbin" == Zhongbin Yu \"jerry\" <Zhongbin> writes:

    Zhongbin> cat /etc/passwd | cut -d ":" -f 1 
    Zhongbin> will do what you want.

        So will:

cut -d ":" -f 1 /etc/passwd
awk -F: '{print $1}' /etc/passwd
perl -F: -lane 'print $F[0]' /etc/passwd
perl -le 'print while ($_=getpwent)' 

        All without a useless use of cat.  And the last would also
show any YP/NIS accounts.

-- 
Fletch                | "If you find my answers frightening,       __`'/|
fletch at phydeaux.org   |  Vincent, you should cease askin'          \ o.O'
678 443-6239(w)       |  scary questions." -- Jules                =(___)=
                      |                                               U






More information about the Ale mailing list