Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!uunet!sunquest!charon.sunquest.com From: jew@charon.sunquest.com (James E. Ward) Newsgroups: comp.unix.questions Subject: awk >> operator Message-ID: <15807@sunquest.UUCP> Date: 14 Mar 91 00:02:53 GMT Sender: news@sunquest.UUCP Organization: Sunquest Information Systems Inc., Tucson Lines: 14 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