file manipulation (easy question I think - REWORDED)

LEWIS WILLIAM M JR lewis at tramp.Colorado.EDU
Wed Jun 19 01:14:28 AEST 1991


In article <1991Jun18.014539.22085 at msuinfo.cl.msu.edu> jpd at tardis.cl.msu.edu (Joe P. DeCello) writes:
>
>To rephrase my previous question:
>
. . .
>The best response to my previous posting was this:
>
>awk '{printf "%s ", $1' < infile > outfile
>
>I changed this to :
>
>awk '{printf "%s, ", $1' < infile > outfile
>
 your solution simply needs another line.  Also, note addition of closing
 brace:
	awk '
		{printf "%s, ", $1}
		END {printf "\n"}
	' < infile > outfile



More information about the Comp.unix.questions mailing list