3 ms·
Simulation is a great thing. I use this wrapper, even in my most trivial shell scripts: pretend=${scriptname_pretend:-false} run() { echo "$@"; $pretend |
by voakbasda 5y ago
Simulation is a great thing. I use this wrapper, even in my most trivial shell scripts:
pretend=${scriptname_pretend:-false}
run() { echo "$@"; $pretend || "$@"; }
Sure, this doesn't give copy/paste re-usable output, but it's really just a quick and dirty sanity check when things start getting complicated.