linux 脚本实例 …
来源:互联网 发布:vb下载网页源代码 编辑:程序博客网 时间:2024/05/16 17:29
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#!/bin/sh
#
#
#
#
########begin###########
sttyerase ^h
read -p "Warning, if the file too much will cause a greater burden on the system, and the time will be long, to continue it? (y Continue or r Empty the last run cache or else Exit)
"choose #Please do not change this code
case $choose in
y|yes|Y|YES)
echo
;;
r|R)
echo "Please wait"
rm -rf /result
if [ "$?" -eq 0 ]
then
echo "Mission success"
else
echo "Mission faild"
fi
;;
*)
echo "Bye~"
exit
;;
esac
read -p "Ok,type the path you want to process
"flie #Please do not change this code
while[[ 0 -eq 0 ]]; do
if [ -d $flie ]
then
echo "Please wait"
sleep 2
ls -alfR $flie |grep -v "\/" |grep -v ^ "\." |grep "\." |awk -F. '{printf "\n" $NF}' > /tmp.tmp
echo "\n"
echo "I found those information"
cat /tmp.tmp | uniq
for name in `cat /tmp.tmp`
do
mkdir -p /result/$name
cp ` find $flie - type f -name "*.$name"` /result/$name 2> /dev/null
done
break;
else
read -r -p "The path entered for the folder is not valid. Enter a valid path.
"flie
continue
fi
done
echo "You can see the file under /result. Each type of file will be placed in a single folder."
echo "Now,enjoy it."
#
#
#
#
########begin###########
stty
"
esac
"
while
else
"
fi
done
阅读全文
0 0
- linux 脚本实例 …
- Linux 启动脚本 完全注释 1 -- 整…
- Unix/Linux 脚本中 "set -e" 的作…
- Linux Kernel SMP …
- Linux Kernel SMP …
- Linux Kernel SMP …
- Linux Kernel SMP …
- linux : error whi…
- linux ERROR 1045 …
- linux shell脚本用while&nbsp…
- linux lds 链接脚本转载
- some online Linux learning mater…
- Top 10 Linux console application…
- QT opensource embedded linux 编…
- Linux Atheros AR8131 AR8132 网卡…
- Linux Shell 脚本编程之函数
- QTP 数据库连接脚本实例
- loadrunner 脚本实例《不断更新》
- 【Scikit-Learn 中文文档】使用 scikit-learn 介绍机器学习 | ApacheCN
- mysql 5.6多实例
- nginx如何设置自定义404页面
- Linux存储管理 —— LVM卷管理
- mount 挂在windos公共目录
- linux 脚本实例 …
- opensuse 配置本地源
- opensuse 网络配置
- 继电器
- OPENSUSE 42.1 KVM虚拟机
- 【回顾】深度学习在语音增强方向上的前沿研究
- 简单易懂的softmax交叉熵损失函数求导
- 成员变量、类变量、局部变量的区别
- kvm虚拟机中virbr0虚拟网络接口的…