extracting "rest of line" in AWK

Tom Poage poage at sunny.ucdavis.edu
Thu Aug 31 09:44:27 AEST 1989


To extract the third argument from

	%% Heading "This is a Graph Heading"

try

	/^%% Heading/ {
		n = split($0, array, "\"")
		print array[2]
	}

which will produce

	This is a Graph Heading

Tom.
-- 
Tom Poage, Clinical Engineering
Universiy of California, Davis, Medical Center, Sacramento, CA
poage at sunny.ucdavis.edu  {...,ucbvax,uunet}!ucdavis!sunny!poage



More information about the Comp.unix.questions mailing list