a few time ago someone help me with searching max lrecl in a file with awk script like this
Code: Select all
SET /a rec1=10
gawk "length>%rec1%{N+=1};END{exit N}" "C:\filename.txt"
echo %errorlevel%
and this return the number of line greather than lrecl rec1
Now I try do file all character non equal "pattern" to column 0,2 like this
Code: Select all
SET pattern=AA
gawk "substr(0,2)!=%pattern%{N+=1};END{exit N}" "C:\filename.txt"
echo %errorlevel%
content of "C:\filename.txt"
AA123456789
BB123456789
Thanks
Dario