shell
来源:互联网 发布:软件侵权的证据 编辑:程序博客网 时间:2024/06/03 21:50
- 判读整数相等
# int为整形变量,如果int == 1,则休眠1分钟,否则,休眠1秒。if [ $int -eq 1 ]; then sleep 1melse sleep 1sfi
2.文件移动
- 文件夹
directory
和other_directory
为目录
# 如果directory存在if [ -d "$directory" ]; then # 移除directory及其中的文件 rm -rf "$directory"else # 如果文件夹directory为空文件夹 if [ "`ls $directory`" != "" ]; then # 将文件夹other_directory下的所有文件移动到文件夹directory下 mv "$other_directory/*" "$directory" fi fi
- 文件
while truedo # 如果文件file存在 if [ -f "$file" ]; then # 删除文件file rm -f "$file" fidone
阅读全文
0 0
- shell
- shell
- shell
- shell
- shell
- Shell
- shell
- Shell
- shell
- shell
- SHELL
- Shell
- shell
- shell
- shell
- shell
- shell
- shell
- 自定义参数绑定ConversionService和mvc:resources的命名冲突
- Tkinter教程之Listbox篇
- c++ 链表的初学
- java心得(hashmap之红黑树)
- Polly 弹性和瞬态故障处理库 介绍
- shell
- 基于MeanShift的目标跟踪算法、实现
- notepad++ 多行注释
- 指针数组和数组指针
- opencv中meanshift和camshift例子的应用
- 设计模式之单例模式
- ES6学习(一)——let和const命令
- Jedis使用中的几个概念
- typedef