awk >> operator

James E. Ward jew at charon.sunquest.com
Fri Mar 15 01:09:56 AEST 1991


I figured it out last night.  The problem was that the first line of the
input file did not define the Output variable, so awk didn't know where
to send it's output.  Thanks if you tried to help!

Final Program:


#!/bin/sh
#
#
awk 'BEGIN {
	Output="/dev/null"
}
{
	if ($0 ~ "^IXXPS2-") Output=$1
	print >>Output
}'



More information about the Comp.unix.questions mailing list