3 ms·
with that, I think if the cp fails, the rm will still be deleted. maybe 'set -euo pipefail' will fix it. Do the $1 and $2 need to be quoted too incase there are
by brendyn 6y ago
with that, I think if the cp fails, the rm will still be deleted. maybe 'set -euo pipefail' will fix it. Do the $1 and $2 need to be quoted too incase there are special characters?
- chubot 6y agoYes all that is true -- it was just a quick demonstration. By the way: - Oil has set -euo pipefail on by default. (And also nullglob) - Oil doesn't split words by default, so you don't need the quotes: https://www.oilshell.org/release/0.8.0/doc/simple-word-eval.html https://www.oilshell.org/release/0.8.0/doc/simple-word-eval.... Those are all "opt in" -- OSH still runs POSIX shell scripts, if you want all the extra ceremony :)