by Hermann Peifer <peifer@[EMAIL PROTECTED]
>
May 9, 2008 at 08:04 PM
moonhkt wrote:
> Hi All
>
>
> D:\Example\Software\awk>uname -a
> CYGWIN_NT-5.1 moon 1.5.24(0.156/4/2) 2007-01-31 10:57 i686 Cygwin
>
>
> D:\Example\Software\awk>gawk -f tag.awk /dev/null ==> no output
>
> D:\Example\Software\awk>gawk -f tag.awk tag.awk
> eric
>
> eric
>
> eric
>
> eric
>
>
> D:\Example\Software\awk>
>
> cat tag.awk
> #!/usr/bin/gawk
> {
> print("eric\n");
> }
The short version is: gawk 'BEGIN{print "eric"}'
If you want, you can also run this as: gawk -f tag.awk
cat tag.awk
BEGIN{print "eric"}
You may wish to start reading some Gawk manual, e.g.this one:
http://www.gnu.org/software/gawk/manual/gawk.html
Hermann