2 # ----------------------------------------------------------------
3 # find-requires for FreeBSD-2.2.x
4 # how do we know what is required by a.out shared libraries?
5 # ----------------------------------------------------------------
8 filelist=`sed "s/['\"]/\\\&/g"`
9 exelist=`echo $filelist | xargs file | grep -F executable | cut -d: -f1 `
10 scriptlist=`echo $filelist | xargs file | grep -E ":.* (commands|script) " | cut -d: -f1 `
14 ldd $f | /usr/bin/awk '/=>/&&!/not found/ { print $3 }'
16 done | sort -u | sed "s/['\"]/\\\&/g" | xargs -n 1 basename | sort -u
18 for f in $scriptlist; do
20 head -1 $f | sed -e 's/^\#\![ ]*//' | cut -d" " -f1