Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!ut-sally!pyramid!ucat!scc!steiny From: steiny@scc.UUCP (Don Steiny) Newsgroups: net.unix Subject: Re: passing command line arguments to awk Message-ID: <731@scc.UUCP> Date: Sat, 20-Sep-86 21:38:58 EDT Article-I.D.: scc.731 Posted: Sat Sep 20 21:38:58 1986 Date-Received: Sun, 21-Sep-86 18:19:11 EDT Distribution: net Organization: Don Steiny Software Lines: 20 Summary: Sure I do it all the time, like this. In article <753@moscom.UUCP>, de@moscom.UUCP (Dave Esan) writes: > > > > I surrender -- is it possible to pass command line arguments to awk? > > If so - how. awk ' statement ; . . . ' file be sure and use single quotes! Lots of awk characters have special meaning to the shell. The following prints the uids in the password file from highest to lowest: awk -F: '{ print $3 }' | sort -n -r -- scc!steiny Don Steiny @ Don Steiny Software 109 Torrey Pine Terrace Santa Cruz, Calif. 95060 (408) 425-0382