| 1 | #!/bin/bash |
| 2 | # |
| 3 | # compare |
| 4 | # |
| 5 | # line diff disregarding duplicates |
| 6 | # dump lines found in file1 but NOT found in file2 |
| 7 | |
| 8 | if [ "$1" = "" ]; then |
| 9 | echo "usage: $0 file1 file2" |
| 10 | exit 1 |
| 11 | fi |
| 12 | |
| 13 | if [ "$2" = "" ]; then |
| 14 | echo "usage: $0 file1 file2" |
| 15 | exit 1 |
| 16 | fi |
| 17 | |
| 18 | comm -23 <(sort $1|uniq) <(sort $2|uniq) |
| 19 | |
| 20 | exit 0 |