root/trunk/bin/reverse_join @ 14857
1 | 1527 | aaronmk | #!/bin/sh
|
---|---|---|---|
2 | # Inner-joins two map spreadsheets in the opposite order they are specified in
|
||
3 | |||
4 | selfDir="$(dirname -- "$0")" |
||
5 | |||
6 | if ! test "$#" -eq 1; then |
||
7 | 3405 | aaronmk | echo "Usage: $0 <map_1 map_0 >joined_map"|fold -s >&2 |
8 | 1527 | aaronmk | exit 2
|
9 | fi
|
||
10 | |||
11 | temp="$(tempfile)" |
||
12 | trap "rm -f $temp" EXIT |
||
13 | |||
14 | cat >"$temp" # read stdin into file |
||
15 | "$selfDir/join" <"$1" "$temp" |