您的位置:首页 > 运维架构 > Shell

shell练习-批量目录/文件del

2015-01-20 23:55 190 查看
#!/bin/bash

#-----------------------------------

# Name:Remove residual XX's file

# Version Number:V0.01

# Date:2015-1-21

# Author:XX

#-----------------------------------

list=`cat list.txt`

if [[ $list ]]

then

for a in $list

do

rm -rf $a

if [ $? -eq 0 ]

then

echo "$a:delete successed."

else

echo "$a:delete failed."

fi

done

fi
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: