Revision 1578
Added by Aaron Marcuse-Kubitza almost 13 years ago
bin/filter_errors | ||
---|---|---|
4 | 4 |
selfDir="$(dirname -- "$0")" |
5 | 5 |
|
6 | 6 |
if ! test "$#" -ge 1; then |
7 |
echo "Usage: env [n=...] $0 grep-options... <input" |
|
7 |
echo "Usage: env [n=... (\"\" for all)] $0 grep-options... <input"
|
|
8 | 8 |
exit 2 |
9 | 9 |
fi |
10 | 10 |
|
11 |
test -n "${n+t}" || n=1 |
|
12 |
|
|
11 | 13 |
"$selfDir/filter_errors_before"|grep "$@"|\ |
12 | 14 |
$(test -n "$n" && echo head -"$n" || echo cat)|"$selfDir/filter_errors_after" |
Also available in: Unified diff
filter_errors: Default to outputing only the first match