Supressing new-lines in awk output

John Rupley rupley at arizona.edu
Tue Feb 7 08:47:36 AEST 1989


In article <21638 at conexch.UUCP>, root at 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

If you have the new awk == nawk:
        nawk 'BEGIN{ORS=" "}; {print $1}' filename

John Rupley      rupley!local at megaron.arizona.edu



More information about the Comp.unix.questions mailing list