Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!bloom-beacon!mit-eddie!uw-beaver!blake!ogccse!littlei!uunet!mcvax!ndosl!fdmetd!steinar From: steinar@fdmetd.uucp (Steinar Overbeck Cook) Newsgroups: comp.unix.questions Subject: Re: Supressing new-lines in awk output Summary: use printf("%s", $1) Keywords: awk Message-ID: <345@fdmetd.uucp> Date: 9 Feb 89 17:10:06 GMT References: <21638@conexch.UUCP> Organization: Fellesdata a.s, Oslo, Norway Lines: 18 In article <21638@conexch.UUCP>, root@conexch.UUCP (Larry Dighera) writes: > Is there a way to supress the newline at the end of awk's print output? > > Given: > > awk '{print $1}' filename > Use this instead: awk '{ printf("%s", $1) }' -- Steinar Overbeck Cook, Fellesdata a.s, P.O. Box 248, 0212 OSLO 2, NORWAY Phone : +47 2 52 80 80 Fax : +47 2 52 85 10 E-mail : ...!mcvax!ndosl!fdmetd!steinar or steinar@fdmetd.uucp