extracting "rest of line" in AWK

Chuck Karish karish at forel.stanford.edu
Sat Aug 26 02:13:53 AEST 1989


In article <3368 at blake.acs.washington.edu> mbader at cac.washington.edu
(Mark Bader) wrote:
>I have a line that looks like

>%% Heading "This is a Graph Heading"

>and I want to do a {print $3} to get the "This is a Graph Heading" part,
>but this obviously dosen't work.   Is there a way to do this?  

{for (num = 3; num <= NF; num++) {printf "%s ", $num}}
{printf "\n"}

	Chuck Karish		karish at mindcraft.com
	(415) 493-9000		karish at forel.stanford.edu



More information about the Comp.unix.questions mailing list