List the extensions installed in Safari for Mac OS X, and state whether each one is enabled
It's primarily a matter of parsing the output of defaults read ~/Library/Safari/Extensions/extensions and formatting it in a user-friendly way. The result actually answers both of your questions:

defaults read ~/Library/Safari/Extensions/extensions | awk '
/Bundle Directory/ {
    split($0, t, /\"/);
    sub(".safariextension", "", t[4]);
    sub("-1", "", t[4]);
    bundle=t[4]
    e="disabled"
}
/Enabled/ {
    e="enabled";
}
/Hidden Bars/ {
    print bundle, "...", e
}' | sort --ignore-case


Creating a shell script out of it is left as an exercise to the reader.

Please note that this will most probably stop to work if Apple decides to change the format of ~/Library/Safari/Extensions/extensions