I'm trying this awk
oneliner from here on cmder-Windows10:
awk '/> \\box.=/,/^$/{print}'
to examine a log file. but I get this error:
The specified path is invalid.
I know the basics of regular expressions but I can't understand what the above command is supposed to do. I would appreciate if you could help me with:
- elaborate the above command and what it is supposed to return? If I realise that maybe I can replicate it with some native Windows command outside the cmder. probably using
findstr
? - why am I getting that error? and if/how I can edit the command to resolve the issue?
P.S. thanks to this post I was able to run the command awk '/box.=/,/^\r\n/' foo
and it works without any error returning what it is expected to return. but I still don't know why the original command returns that error.
Demonstrating what your command does:
Your script executed:
If you are running it in Windows
/^$/
might not work since Windows uses\r\n
newlines. Instead, try: