News for hackers. Stuff that matters.
Re:Bashing the Bash – Replacing Shell Scripts with Python (2... by rascul on Saturday March 26, 2022 @09:53AM (#30811775)
> If you have a problem that involves "run a command with a list of parameters but not if the list is empty" and you don't immediately think of `xargs -r`, then consider that it's because you don't understand the tools, not because the tools are bad.

find has -exec, xargs isn't necessary.

Re:Bashing the Bash – Replacing Shell Scripts with Python (2... by Arnavion on Saturday March 26, 2022 @02:57PM (#30814326)
`-exec` would run the command for each file separately, which isn't what the original problem wanted, and I didn't want to assume that it would be equivalent.
Re:Bashing the Bash – Replacing Shell Scripts with Python (2... by Izkata on Saturday March 26, 2022 @03:30PM (#30814626)
It runs them separately if you end the exec with ";", it appends as many as possible to the same command if you end it with "+"
Re:Bashing the Bash – Replacing Shell Scripts with Python (2... by Arnavion on Saturday March 26, 2022 @04:18PM (#30815008)
Ah yes, I always forget about that.