-F option for awk

George Turczynski george at hls0.hls.oz
Tue Aug 14 10:03:36 AEST 1990


In article <491 at llnl.LLNL.GOV>, rjshaw at ramius.ocf.llnl.gov (Robert Shaw) writes:
> When awk'ing something like a passwd file, where the reasonable choice
> of field separator is something other than whitespace, how do you 
> let a line simply fall through and be printed unchanged?
> 

I must have misunderstood your question.  This works fine:

	tmp: awk -F: '{ if( $1 == "nobody" ) print }' /etc/passwd
	nobody:*:-2:-2::/:

This is under SunOS 4.0.3, and works for both sh & csh.  I don't know
what you're running, but it might have been useful to know >:-}

-- 
| George P. J. Turczynski.          |---------------------------------------------------- 
| Computer Systems Engineer.        | ACSnet: george at highland.oz | I can't speak for the |
| Highland Logic Pty. Ltd.          | Phone: +61 48 683490       | company, I can barely |
| Suite 1, 348-354 Argyle St        | Fax:   +61 48 683474       | speak for myself...   |
| Moss Vale. NSW. Australia. 2577   |---------------------------------------------------- 



More information about the Comp.unix.questions mailing list