awk >> operator
James E. Ward
jew at charon.sunquest.com
Thu Mar 14 10:02:53 AEST 1991
I would like to break a file into smaller files based on lines in the text.
I can get the filename I want into a variable, but can't seem to get the
awk syntax right to redirect print output into the file contained in the
variable. Here's an example script. Can anyone show me the proper syntax?
awk '{
if ($0 ~ "^IXXPS2-") Output=$1
print >> Output
}'
Thanks in advance,
James
More information about the Comp.unix.questions
mailing list