分类: LINUX
2006-06-29 20:34:06
#!/bin/sh #This is a scripe that copy the library file about a command. #Auther:wangyao #Mail:wangyao@cs.hit.edu.cn # ipconfigme@gmail.com #Usage: dostrip /media/usbdisk function striplib() { file $file | grep "not stripped$" if [ $? -eq 0 ];then echo "No stripped:">>sizefile echo -n "size:">>sizefile ls -l $file | cut -d" " -f5 >>sizefile size $file >> sizefile echo "stripped:">>sizefile strip $file ls -l $file | cut -d" " -f5 >>sizefile size $file >> sizefile fi } System_Dir=$1 if [ ! -e $System_Dir ];then echo "The path you give doesn't exist!" fi find $System_Dir | grep -v '/$' >> lsfile for file in $(cat lsfile);do # get the message in file striplib done rm lsfile |