Hello
I am executing the following script
nawk 'NR == 1 || substr($0,63,5) ~ /H... / && \
++ == 2 { fn && close(fn); fn = "part" ++c; _ = 1 }
{ print > fn }' sample.dat
When i execute as it is it is executing fine. but when i execute the whole script as a single line like below
nawk 'NR == 1 || substr($0,63,5) ~ /H... / && \++ == 2 { fn && close(fn); fn = "part" ++c; _ = 1 }{ print > fn }' sample.dat
I am getting the following error
Syntax Error The source line is 1.
The error context is
NR == 1 || substr($0,63,5) ~ /H... / && >>> \ <<< _++ == 2 { fn
awk: 0602-500 Quitting The source line is 1.
Please help me out
Thanks