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.
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.
@fiore Basically, read up on the -P option.
"Taco Bell Programming" is a good read, and has an example that'll get you started on the xargs rabbit hole.
http://widgetsandshit.com/teddziuba/2010/10/taco-bell-programming.html
grep -r for recursion and grep -e for regexps. And grep -f secrets.txt to load the secret patterns to match from a file, of course. Of course.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
@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!
@alys yeah, it's basically grep -f file-of-strings-and-encodings-to-seek
... with extra steps and shitty vibe coded python