alt
Hacker News
Joker_vD
•
today at 3:13 AM
•
1 reply
•
view on HN
if [ -n "$DRY_RUN" ] ; then alias rm='echo rm' alias cp='echo cp' fi
Of course, output redirects will still overwrite the files, since the shell does it and IIRC this behaviour can't be changed.
Replies
digiown
•
today at 3:22 AM
set -o noclobber
➕ show 1 reply
set -o noclobber