Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- :<<israeltorres_comment_block
- ./findversion.sh
- Israel Torres
- 2012-03-22
- nasty way to brute force version info from binary
- Mac OS X 10.7.3 11D50d
- Darwin Kernel Version 11.3.0
- GNU bash, version 3.2.48(1)-release
- israeltorres_comment_block
- #required app check
- rqdapp='strings'
- hash $rqdapp 2>&- || { echo >&2 "$rqdapp binary not found - aborting"; exit 1; }
- #
- if [ ! $# -lt 1 ]; then
- SOFTWARE=$1
- strings $(whereis "$SOFTWARE") | grep -C1 -i vers
- else
- echo "usage: $0 'string'"
- echo "example: $0 string"
- fi
- #eof
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement