file manipulation (easy question I think)

J. Horsmeier jos at and.nl
Mon Jun 24 22:30:49 AEST 1991


In article <1991Jun17.200748.19324 at msuinfo.cl.msu.edu> jpd at tardis.cl.msu.edu (Joe P. DeCello) writes:
>
>What is this best (easiest) way in which to get the first word
>of each line in a text file to a single line in a new text file?
>=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>Joseph P. DeCello III                e-mail:  jpd at cad.msu.edu

Hi there, 

use awk(1), as follows: 

	awk '{ print $1 }' file_in > file_out


Jos


+----------------------------------------------------------------------+
|O   J.A. Horsmeier AND Software B.V.        phone : +31 10 4367100   O|
|O                  Westersingel 106/108     fax   : +31 10 4367110   O|
|O                  3015 LD  Rotterdam NL    e-mail: jos at and.nl       O|
|O--------------------------------------------------------------------O|
|O               I am a Hamburger (F. Zappa 1974)                     O|
+----------------------------------------------------------------------+



More information about the Comp.unix.questions mailing list