cut、file、for、ls、的综合应用实例
2012-01-08 10:01
323 查看
#!/bin/bash
files=`ls $1/*.so`
if [ $# -eq 0 ]; then
echo "Argument too less!"
fi
for file in $files; do
if [ `file ${file} | cut -d" " -f5` != "shared" ]
then
file ${file}
rm ${file}
echo "Remove ${file}"
fi
done
files=`ls $1/*.so`
if [ $# -eq 0 ]; then
echo "Argument too less!"
fi
for file in $files; do
if [ `file ${file} | cut -d" " -f5` != "shared" ]
then
file ${file}
rm ${file}
echo "Remove ${file}"
fi
done
相关文章推荐
- Linux入职基础-7.5_Makefile应用综合实例
- Linux C编程--进程间通信(IPC)6--综合应用实例--信号量和共享内存的使用
- ARM—Linux基本数据类型综合应用实例
- js综合应用实例简单的表格统计
- Linux C编程--进程间通信(IPC)6--综合应用实例--信号量和共享内存的使用
- Android Studio 导入应用时报错 Error:java.lang.RuntimeException: Some file crunching failed, see logs for de
- Json+jquery+asp.net 综合应用实例
- 23种设计模式综合实例应用目录
- Makfile 应用进阶实例
- shell 编程 for 循环详解及应用实例
- JsonResult&FileResult应用实例
- PDO综合实例应用
- Java (for循环综合应用)
- 简单工厂模式——23种设计模式综合实例应用
- Makfile 应用进阶实例
- SuperMap iMobile for iOS 8C三维应用实例
- SQL 综合应用(2.数据控制) 实例_(学生,课程表,选修表)
- Maticsoft.Framework for Asp.Net框架应用实例(一)
- 工厂方法模式——23种设计模式综合实例应用
- ArcGIS for android 实例应用之添加地图(1)