Supressing new-lines in awk output

Larry Dighera root at conexch.UUCP
Fri Feb 3 16:35:38 AEST 1989


Is there a way to supress the newline at the end of awk's print output?

Given:

	awk '{print $1}' filename

Where filename contains:

	field1.1 field1.2
	field2.1 field2.2
	field3.1 field3.2

awk will print the first field of each record on a seperate line:

	field1.1
	field2.1
	field3.1

Is there a way to cause each "$1" to be printed with a space delimiter instead,
such that the output would look like:

	field1.1 field2.1 field3.1


-- 
USPS: The Consultants' Exchange, PO Box 12100, Santa Ana, CA  92712
TELE: (714) 842-6348: BBS (N81); (714) 842-5851: Xenix guest account (E71)
UUCP: conexch Any ACU 2400 17148425851 ogin:-""-ogin:-""-ogin: nuucp
UUCP: ...!uunet!turnkey!conexch!root || ...!trwrb!ucla-an!conexch!root



More information about the Comp.unix.questions mailing list