Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!csn!boulder!tramp.Colorado.EDU!lewis From: lewis@tramp.Colorado.EDU (LEWIS WILLIAM M JR) Newsgroups: comp.unix.questions Subject: Re: file manipulation (easy question I think - REWORDED) Keywords: awk sed Message-ID: <1991Jun18.151428.22784@colorado.edu> Date: 18 Jun 91 15:14:28 GMT References: <1991Jun18.014539.22085@msuinfo.cl.msu.edu> Sender: news@colorado.edu (The Daily Planet) Organization: University of Colorado, Boulder Lines: 19 Nntp-Posting-Host: tramp.colorado.edu In article <1991Jun18.014539.22085@msuinfo.cl.msu.edu> jpd@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