3 ms·
Here is a more comprehensive one-liner to see all items with more than 1 applications on a ACL list: security dump-keychain -a > keychain-results.txt
by peterhil 11y ago
Here is a more comprehensive one-liner to see all items with more than 1 applications on a ACL list:
security dump-keychain -a > keychain-results.txt
grep -P '(^(class|keychain):|\s+("(svce|acct)"|0x0000000(1|7)) <blob>="[^"]*"|^\s+applications \(([2-9]|[0-9]{2,})\):|^\s+[0-9]+:)' keychain-results.txt | \
perl -pe 's/\n/\0/g' | perl -pe 's/\0keychain:/\nkeychain:/g' | \
grep -aP 'applications \(([2-9]|[0-9]{2,})\):' | \
sort -u | perl -pe 's/\0/\n/g'