2016-08-19 19:21:44 +02:00
#!/bin/bash
2019-05-21 02:07:09 +01:00
readonly program = " $( basename " ${ 0 } " ) "
2016-08-19 19:21:44 +02:00
2019-05-21 02:07:09 +01:00
function usage {
echo "
List Bundle IDs for currently loaded kernel extensions (kexts). Useful to identify kexts installed by packages. Kexts attributed to Apple are excluded from the output.
2016-08-19 19:21:44 +02:00
2019-05-21 02:07:09 +01:00
Usage:
${ program } [options]
2016-08-19 19:21:44 +02:00
2019-05-21 02:07:09 +01:00
Options:
-h, --help Show this message.
" | sed -E 's/ {4}//'
2016-08-19 19:21:44 +02:00
}
2019-05-21 02:07:09 +01:00
if [[ " ${ 1 } " = ~ ^( -h| --help) $ ]] ; then
usage
exit 0
2016-08-19 19:21:44 +02:00
fi
2019-05-21 02:07:09 +01:00
/usr/sbin/kextstat -no-kernel -list-only | \
/usr/bin/awk '{print $6}' | \
/usr/bin/grep --invert-match '^com\.apple\.'