Created
June 12, 2016 20:56
-
-
Save kuniss/79f906f46cc40022b440f54ad2622953 to your computer and use it in GitHub Desktop.
Code accompanying article "Let it flow!"
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
determineLibraryDependencies() { | |
read input | |
for f in $input; do | |
ldd $f | awk '/=>/ { print $1 }' | |
done | |
} | |
determineFullPathLibraryDependencies() { | |
read input | |
for f in $input; do | |
ldd $f | awk '/=>/ { if ( $3 == "" || match($3, "0x")) {print $1} else {print $3} }' | |
done | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
ulimit -c 0 | |
. ./determineLibraryDependencies.sh | |
echo $* | determineFullPathLibraryDependencies | sort -u -r | xargs -r -n 1 basename |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment