[Nottingham] bash script help
Peter Chang
Peter.Chang at nottingham.ac.uk
Wed Aug 17 19:34:25 BST 2005
On Wed, 17 Aug 2005, Brian Pickford wrote:
> Hi all, I was wondering if any talented scripters in the group could
> write a script for me please?
Use something like
ldd /usr/bin/gthumb | grep '(' | awk '{ print $(NF-1) }' | \
grep -v -e '=' -e 'not found' | xargs -i cp -p {} destdir
Quick explanation:
1) get shared library dependencies
2) check every line for an address mapping
3) extract next to last field
4) filter out possible oddities (like not found and linux-gate.so.1
entries)
5) process list...
hth
Peter
This message has been checked for viruses but the contents of an attachment
may still contain software viruses, which could damage your computer system:
you are advised to perform your own checks. Email communications with the
University of Nottingham may be monitored as permitted by UK legislation.
More information about the Nottingham
mailing list