Revision 900
Added by Aaron Marcuse-Kubitza almost 13 years ago
bin/get_errors | ||
---|---|---|
1 |
#!/bin/sh |
|
2 |
# Selects just the error messages from `map` output |
|
3 |
# Usage: self {input...|<input} |
|
4 |
|
|
5 |
exec grep --color=never -F '[101;97m' "$@" |
|
6 | 0 |
bin/error_stats | ||
---|---|---|
1 |
#!/bin/bash |
|
2 |
# Displays statistics about the error messages in `map` output |
|
3 |
# Usage: self {input...|<input} |
|
4 |
|
|
5 |
alias grep='grep --color=never' |
|
6 |
|
|
7 |
errorsStr="$(grep -F '[101;97m' "$@"|sort|uniq)" |
|
8 |
splitErrors () |
|
9 |
{ |
|
10 |
local IFS=$'\n' |
|
11 |
errors=($errorsStr) |
|
12 |
} |
|
13 |
splitErrors |
|
14 |
|
|
15 |
for error in "${errors[@]}"; do |
|
16 |
count="$(grep -F "$error" "$@"|wc -l)" |
|
17 |
printf "%6d %s\n" "$count" "$error" |
|
18 |
done |
|
0 | 19 |
Also available in: Unified diff
Renamed get_errors to error_stats and added counts of each error message