Revision 8707
Added by Aaron Marcuse-Kubitza over 11 years ago
bin/in_place | ||
---|---|---|
5 | 5 |
file="$1" |
6 | 6 |
shift |
7 | 7 |
|
8 |
test "$#" -ge 1 || exit 0 # no command to run |
|
9 |
|
|
8 | 10 |
temp="$(tempfile)" |
9 | 11 |
onExit () { rm -f "$temp"; } |
10 | 12 |
trap onExit EXIT |
Also available in: Unified diff
bin/in_place: don't run if no command to run, because that would erase the file