repo.or.cz
/
anomen-kernel-config.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
zax - kernel 4.0.5
[anomen-kernel-config.git]
/
tools
/
lsmodcmp
blob
ac25c7631a4041b80a22e752e669e40d76b647e6
1
#!/bin/sh
2
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
9
10
TMP1
=
$
(
mktemp
)
11
TMP2
=
$
(
mktemp
)
12
13
cat
$1
| cut
-f
1
-d
' '
|
sort
>
$TMP1
14
cat
$2
| cut
-f
1
-d
' '
|
sort
>
$TMP2
15
16
diff
-wu
$TMP1 $TMP2
17
18
rm
-f
$TMP1 $TMP2
19
20