Project

General

Profile

« Previous | Next » 

Revision 7524

Added sort_ci to sort a spreadsheet, ignoring leading punctuation

View differences:

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