Some AI coder: "I" wrote this new thing that searches for hidden strings in files.

Most youngins: Oh wow, that is so useful, I wish I had this years ago!

Us greybeards: Congratulations, you reinvented grep.

This is absolutely a subtoot.

Cue someone pointing out the code I am talking about may be running multithreaded and be faster than grep.....

Congratulations, you reinvented grep with xargs.

@nuintari xargs is still serial though.
You reinvented ripgrep maybe. Or git grep

@StompyRobot

https://blogs.kenokivabe.com/article/multi-threaded-processing-using-xargs-and-parallel

decent place to start on the rabbit hole of how awesome xargs can be

Edit: I was on mobile when I found this link, and thus barely scanned it. It isn't actually all that great. Stick to the classics: Taco Bell Programming and then just dig into the man pages.

http://widgetsandshit.com/teddziuba/2010/10/taco-bell-programming.html

Multi-Threaded Processing Using xargs and Parallel - Keno Kivabe

@nuintari @StompyRobot ahh please not!
please don't tell people to `ls *.png | xargs…`; that's a recipe for unexpected delimiters-in-filenames disaster, and trivial to do better (`for f in *.png; do command "$f"; done`).
Especially annoying is the "basic" `find -criteria | xargs command` example, which can be safely and easily be handled by `find -criteria -exec 'command {}'`.
When piping filenames in `xargs` or `parallel`,at least make sure to use zero bytes as delimiters (e.g. `find -print0`)

@nuintari @StompyRobot with `parallel`, all the bad (really bad! What does the user want to happen when they `ls *.txt | parallel mv -t /mnt/backup`, and what does really happen in case there's zero .txt files?) examples of kind `ls *.png | parallel -opts cmd` should just be `parallel -opts cmd ::: *.png`

reading that article, it's honestly a bit like `parallel`'s man page or quick start tutorial didn't exist!

@nuintari @StompyRobot (quite frankly, that article is so full of popular really bad ideas that I think it's quite likely AI slop to a large amount, but I'm not quite sure. It certainly has a bit much personality for that, but both the reurgitation of long-discouraged patterns and the what-to-use-when table suggest AI slop)