sed/awk question

Arnold D. Robbins {EUCC} arnold at mathcs.emory.edu
Fri May 26 07:54:48 AEST 1989


In article <1049 at necis.UUCP> dhm at necis.UUCP (Dave Mitchell) writes:
>Using sed or
>awk, I want to print the lines of a file (from line 1) up to the first
>occurrence of a dollar sign. Thanks for the help.

awk '/\$/  { exit }
	   { print }'

That's all there is to it.
-- 
Arnold Robbins -- Emory University Computing Center | Unix is a Registered
DOMAIN: arnold at unix.cc.emory.edu		    | Bell of AT&T Trademark
UUCP: gatech!emoryu1!arnold  PHONE: +1 404 727-7636 | Laboratories.
BITNET: arnold at emoryu1	     FAX:   +1 404 727-2599 |         -- Donn Seeley



More information about the Comp.unix.questions mailing list