3 ms·
I tend to write one script that emits a list of files, and another that takes a list of files as arguments. It's simple to manually test corner cases, and then
by hinkley 5y ago
I tend to write one script that emits a list of files, and another that takes a list of files as arguments.
It's simple to manually test corner cases, and then when everything is smooth I can just
script1 | xargs script2
It's also handy if the process gets interrupted in the middle, because running script1 again generates a shorter list the second time, without having to generate the file again.
When I'm trying to get script1 right I can pipe it to a file, and cat the file to work out what the next sed or awk script needs to be.