Talk About Network



Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Awk > Re: How to usin...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 5 Topic 2232 of 2236
Post > Topic >>

Re: How to using gawk in Windows

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




 5 Posts in Topic:
How to using gawk in Windows
moonhkt <moonhkt@[EMAI  2008-05-09 10:36:27 
Re: How to using gawk in Windows
Hermann Peifer <peifer  2008-05-09 20:04:56 
Re: How to using gawk in Windows
Ted Davis <tdavis@[EMA  2008-05-09 15:28:37 
Re: How to using gawk in Windows
moonhkt <moonhkt@[EMAI  2008-05-09 20:01:36 
Re: How to using gawk in Windows
Ted Davis <tdavis@[EMA  2008-05-10 12:24:38 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Thu May 15 23:59:40 CDT 2008.