Project

General

Profile

1 7524 aaronmk
#!/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