root/bin/filter_errors @ 11927
1 | 1461 | aaronmk | #!/bin/sh
|
---|---|---|---|
2 | # Filters `map` error messages
|
||
3 | |||
4 | selfDir="$(dirname -- "$0")" |
||
5 | |||
6 | if ! test "$#" -ge 1; then |
||
7 | 3405 | aaronmk | echo "Usage: env [n=... (\"\" for all)] $0 grep-options... <input"\ |
8 | |fold -s >&2 |
||
9 | 1461 | aaronmk | exit 2
|
10 | fi
|
||
11 | |||
12 | 1578 | aaronmk | test -n "${n+t}" || n=1 |
13 | |||
14 | 1461 | aaronmk | "$selfDir/filter_errors_before"|grep "$@"|\ |
15 | $(test -n "$n" && echo head -"$n" || echo cat)|"$selfDir/filter_errors_after" |