News for hackers. Stuff that matters.
Re:Exploring CLI Best Practices by notsorandomname on Tuesday October 11, 2016 @04:59PM (#12688475)
Though, you still should provide a way to read from file/write into file. I prefer passing "-" or /dev/stdin (/dev/stdout) for that purpose. Just for the sake of debuggability, if someone would like to debug your script with a debugger/debug prints/debug reads
Re:Exploring CLI Best Practices by andrewstuart2 on Tuesday October 11, 2016 @06:36PM (#12689088)
Why not both? Many of my favorite utilities are stdin/out by default, have file parameters, and will accept '-' to go back to stdin/out.

This is highly useful if you want to allow composition into scripts without forcing users to dynamically build parameters. Meaning, they can use, e.g. `FILE_NAME=${FILE_NAME:-"-"}; some-util --output $FILE_NAME;` and not have to decide whether or not to use the --output parameter in their script.

Re:Exploring CLI Best Practices by Athas on Tuesday October 11, 2016 @05:28PM (#12688668)
Is that not why you have stderr?