3eea219 ^
9822519 ^
1 2 3 4
5
6 7 8
9
10 11
#!/bin/bash -eu # Apply a filter command to a set of files filter=$1; shift trap 'rm -f "$arg.tmp"' EXIT for arg do echo apply-filter "$filter" "$arg" bash -c "set -o pipefail; $filter" < "$arg" > "$arg.tmp" maybe-mv "$arg.tmp" "$arg" done