[ale] another scripting question

Ben Phillips pynk at cc.gatech.edu
Wed Dec 1 14:38:50 EST 1999


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