05-04-2005
7,
0
Join Date: May 2005
Last Activity: 5 October 2005, 10:59 AM EDT
Posts: 7
Thanks Given: 0
Thanked 0 Times in 0 Posts
Help for a newby
I am new to using nawk. When I put the following line in script file test1.awk
I get the results:
{ print NR, length($0),NF}
>nawk -f test1.awk head.txt
1 63 5
2 2622 188
3 2166 155
4 3192 228
5 2679 192
.....
but if I modify the test1.awk file to look like this:
BEGIN {FS = ","}
{ print NR, length($0),NF}
when if do:
>nawk -f test1.awk head.txt
I get
nawk: syntax error at source line 1
context is
<<< BEGIN {FS = >>> ","}
nawk: bailing out at source line 1
I have tried many combinations o single quotes, no quotes with the same result.
Any Idea Why???