Comment by Joker_vD
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. 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.
set -o noclobber