Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
mr-wendel
· 5y ago · 0 comments
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.
Comments
[–]
ebeip90
5y ago
For 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 }