[ale] another scripting question

Zhongbin Yu " <z.yu at premcall.com> Zhongbin Yu " <z.yu at premcall.com>
Wed Dec 1 15:28:06 EST 1999


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

Jerry Yu
----------------------------------------------------------------------------
Systems Engineer	| zyu at tc.net
Premiere Technologies	| 404-262-8544(O)	1-800-979-1105 (P)
Atlanta, GA 30326	| ae.tc.net/dept/engineering/op/public/developer/zyu

On Wed, 1 Dec 1999, Ben Phillips wrote:

#If I want sed to delete everything on every line of a file AFTER the first
#word on the line, how would I do that?  Given sed's similarity to vi, it
#seems like this shouldn't be hard.  Say I'm stripping a passwd file down to
#just the usernames, so every line is like:
#
#joe:x:100:100:group:blahblahblah
#dave:x:100:100:group:blahblahblah
#bob:x:100:100:group:blahblahblah
#
#and I want:
#
#joe
#dave
#bob
#
#
#                      __   _                 "If pro is opposite of con, 
#Ben Phillips         /  '_' )         ,,,    then what is the opposite of
#pynk at cc.gatech.edu   |  | ()|||||||||[:::)   progress?  Congress!"
#                     \__.-._)         '''     -- men's restroom, House of
#		                              Representatives, Washington
#






More information about the Ale mailing list