awk question (printing to the file)

From: Wiktor Niesiobedzki <bsd_at_w.evip.pl>
Date: Fri, 14 May 2004 15:36:04 +0200
Hi,

The GNU awk, that is present in FreeBSD-4 branch accepts following syntax:
$ echo foo,bar | awk -F ',' '{print "Foobar: " $1 > $2}'
$ echo foo,bar | awk -F ',' '{print "Foobar: " $1 > $2 ".foo"}'

While the awk resent in FreeBSD-Current branch accets only the first line,
while by second comand bails out with:
awk: syntax error at source line 1
 context is
         {print "Foobar: " $1 > $2 >>>  ".foo" <<<
awk: illegal statement at source line 1


Is this intended behaviour?

Cheers,

Wiktor Niesiobedzki
Received on Fri May 14 2004 - 04:36:11 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:54 UTC