shell-util
来源:互联网 发布:在德国办网络 编辑:程序博客网 时间:2024/06/08 10:40
#!/bin/bash
#1-2-9
#判断命令行是否带有两个文件名的参数
if [ "$1" = "" ] || [ "$2" = "" ];then
echo "Please enter file name"
exit 1
fi
#判断目标文件是否存在
if [ -e $2 ];then
echo "The file already exists "
until [ ! -f $2 ] #监视该文件是否被删除
dosleep 1
done
echo "The file have been deleted"
fi
#执行源文件移动为目标文件的命令
if [ ! ` mv $1 $2` ];then
echo "mv successfully"
else
echo "mv error"
fi
- shell-util
- shell ----- 循环 for && while && util
- org.apache.hadoop.util.Shell$ExitCodeException
- util
- Util
- Util
- util
- util
- util
- util
- util
- Util
- Exception from container-launch: org.apache.hadoop.util.Shell$ExitCodeException
- Linux Shell 学习笔记(九)---for/while/util/跳出循环
- Exception from container-launch: org.apache.hadoop.util.Shell$ExitCodeException
- shell编程中for/while/util/case/select/break/continue
- spark1.5.2 spark-shell报错:java.util.concurrent.RejectedExecutionException
- Linux Bash Shell学习(十三):流程控制——while/util
- Dedicated Server Configuration【每日一译】--2012-10-15
- mysqldump常用参数
- 搞定Webmin错误日志显示Failed to initialize SSL connection
- 利用GetIfTable ,GetIfEntry 实时判断网线插拔状态
- phpcms v9 企业会员 选择企业库类型 无法注册
- shell-util
- Widows 操作系统内部版本号
- 从此以后 陌路此生。伤感日志
- 插入flash方法
- 将小写字母转换为大写字母
- Socket的阻塞模式和非阻塞模式
- unix解释器原理 .
- IOS开发者证书配置和安装
- Rocchio算法