3 ms·
The printf version will give you automatic quoting making copy'n'paste really easy to test. It' also mixes well w/ a verbose option for "--verbose" or such.
by mr-wendel 5y ago
The printf version will give you automatic quoting making copy'n'paste really easy to test. It' also mixes well w/ a verbose option for "--verbose" or such.
- ebeip90 5y agoFor those using zsh, you can get better quoting (and only when necessary, and handles non-printable characters and newlines better) than using printf. run() { if dry; then echo "${(q-)@}" else "$@" fi }