zax - kernel 4.0.5
[anomen-kernel-config.git] / tools / lsmodcmp
blobac25c7631a4041b80a22e752e669e40d76b647e6
1 #!/bin/sh
3 if test -z "$1" -o -z "$2"
4 then
5 echo "Compare two lsmod outputs."
6 echo "Usage: $0 lsmod1 lsmod2"
7 exit 1
8 fi
10 TMP1=$(mktemp)
11 TMP2=$(mktemp)
13 cat $1 | cut -f 1 -d ' ' | sort > $TMP1
14 cat $2 | cut -f 1 -d ' ' | sort > $TMP2
16 diff -wu $TMP1 $TMP2
18 rm -f $TMP1 $TMP2