Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
echo "This script prints the filenames of any dylibs in your /usr/local/ that depend on the System Python"
for f in `find /usr/local -iname "*.dylib"`; do
otool -L "$f" | grep Python | grep System &> /dev/null
status=$?
if [ $status -eq 0 ]; then
echo "$status: $f"
fi
done