Talk About Network

Google


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: Difference ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 5 Topic 2091 of 2341
Post > Topic >>

Re: Difference beetwen awk and gawk?

by Janis <janis_papanagnou@[EMAIL PROTECTED] > Dec 4, 2007 at 04:14 AM

On 4 Dez., 12:29, Dawid Murga=B3a <murg...@[EMAIL PROTECTED]
> wrote:
> Hi,
> I'm new to awk, I wrote a simple script using gawk, then change it to
awk:=

>
> awk '/[0-9]+ [a-z0-9]+/{printf " \047%s\047)\n", $1 >
"text.txt"}END{print=
f "END\n" > "test.txt"}' afile.dat
>
> afile.dat :
> 123456 abc
> 111111 abcd
>
> It works with gawk, but in awk returns an error:
>
> .wk: 0602-533 Cannot find or open file afile.dat

What program is that ".wk" that you are using?

>   The source line number is 1.
>   Syntax Error The source line is 1.
>
> Any ideas? afile.dat has read rights.

The file is maybe not in the directory where you started awk.

Are you using that on a WinDOS platform? Then better put the awk
program in a file (to avoid quoting issues) and call it as

   awk -f your-awk-file your-data


Janis

>
> Regards, David
 




 5 Posts in Topic:
Difference beetwen awk and gawk?
=?ISO-8859-2?Q?Dawid_Murg  2007-12-04 12:29:00 
Re: Difference beetwen awk and gawk?
Janis <janis_papanagno  2007-12-04 04:14:56 
Re: Difference beetwen awk and gawk?
=?ISO-8859-2?Q?Dawid_Murg  2007-12-04 14:41:19 
Re: Difference beetwen awk and gawk?
Janis <janis_papanagno  2007-12-04 08:19:21 
Re: Difference beetwen awk and gawk?
Bill Marcum <marcumbil  2007-12-19 15:28:20 

Post A Reply:
  Go here to Signup

AddThis Feed Button


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

Contact
tan12V112 Wed Aug 27 17:50:02 CDT 2008.