Narly Nawk Script

Bill Michel bm at bike2work.Eng.Sun.COM
Tue Dec 11 09:56:05 AEST 1990


I'm working on a shell script that makes extensive use of (n)awk.

I'm *really confused as to the general workings of the script, and
would apprecieate some help.

Assume my script to be called "nawkfile" it is invoked as follows:

nawkfile inputfile

where inputfile is the file containing the input to be processed.

My main questions are :

1) where does the data put into "string" go after the first call
   to nawk?

2) does $* mean a recursive call to the script, if so, how can 
   this be used as input to the second nawk call

Thanks in advance


--------------------------------

The general layout is as follows

nawk '
{
process a bunch of text, and append it to the variable "string"
}
END {
  print string
}
' $* |
nawk '
{
do some more processing
}' |

nawk '
{
do some more processing and send the output to a file
}
--
Bill Michel			
bm at eng.sun.com		These views are my own, not Sun's.



More information about the Comp.unix.questions mailing list