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


|