Revision 7524
Added by Aaron Marcuse-Kubitza almost 12 years ago
bin/sort_ci | ||
---|---|---|
1 |
#!/bin/sh |
|
2 |
# Sorts a spreadsheet, ignoring leading punctuation |
|
3 |
|
|
4 |
selfDir="$(dirname -- "$0")" |
|
5 |
|
|
6 |
sedEreFlag="$(test "$(uname)" = Darwin && echo E || echo r)" |
|
7 |
|
|
8 |
sed () { "$(which sed)" -"$sedEreFlag" "$@";} |
|
9 |
|
|
10 |
sed 's/^[[:punct:]]*(.*)$/\1,&/'|"$selfDir/sort" 0|"$selfDir/cols" 1|uniq |
|
0 | 11 |
Also available in: Unified diff
Added sort_ci to sort a spreadsheet, ignoring leading punctuation