Xref: utzoo comp.unix.questions:13219 comp.sys.ibm.pc:28244 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!cs.utexas.edu!uunet!portal!cup.portal.com!MJB From: MJB@cup.portal.com (Martin J Brown-Jr) Newsgroups: comp.unix.questions,comp.sys.ibm.pc Subject: PolyAwk - AWK question Message-ID: <17886@cup.portal.com> Date: 3 May 89 09:10:46 GMT Organization: The Portal System (TM) Lines: 28 I just purchased Polytron's Polyshell and Polyawk. While checking out Polyawk I ran across something that struck me as odd. The following piece of "code" runs fine and works as expected, accepting all lines except those that begin with "Command:", and putting the accepted lines in the file d:foo. You will notice the absence of a input filename, which causes Polyawk to accept the input from the keyboard. code follows, enter exactly the same way at the Polyshell prompt: awk '$0 !~ /Command:*/ { print $0 >"d:foo" }' The above code works as expected, but when I had an input filename to this "code", I get a warning that the program will accept and pass on to d:foo all of the input lines (paraphrasing). At which point, the cursor drops to a newline and just blinks, doing nothing until I do a control-c, which dumps me back to the prompt. here is the modified code that just hangs there: awk '$0 !~ /Command:*/ { print $0 >"d:foo" } "d:file.txt"' (note *** quotes were needed around filenames to avoid warnings, I don't think this was documented is this no think this was documented. Is this normal for awk?) Could someone out there explain my error(s)? Would awk react the same way that PolyAWK is reacting? Any further suggestings/ideas? Thanx for any help! - MJB -