Ivan Sagalaev is a user on mastodon.social. You can follow them or interact with them if you have an account anywhere in the fediverse. If you don't, you can sign up here.

@isagalaev An oldy but goody post indeed. I remember reading it at the time but I had missed xargs -P. Nice find.

@kensanata @isagalaev Happy I continue reading after the.. cat *.pgn | grep "Result" .. I mean.. why use a 'cat' when you 'grep'. Then I thought.. why the hell do you use 'grep' when you 'awk'.

The only complaint I have with the last command is that it should have been just that single 'mawk'. No need for find and extra 'mawk'.

@isagalaev @kensanata I haven't used 'mawk' so can't say for sure.. but 'awk *.pgn' and then a 'fprint' instead of 'print'.

@shellkr @isagalaev awk *.png leaves expansion to the shell and the you run into command line limits and all that. I think find will be required unless you traverse the file system using some loop inside awk. I don’t know enough about awk to know whether that is possible.

@kensanata @isagalaev Yes, that could potentially be an issue... and yes, you could do a loop instead. If you have subdirs then 'find' would be a good fit.