shell
D_pens
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Ubuntu中source、sh、bash、./ 执行shell脚本的区别
source命令用法source test.sh作用:在当前 bash 环境下读取并执行 test.sh 中的命令。该 test 文件可以无 “执行权限”bash和sh命令用法bash test.sh或sh test.sh作用:打开一个子shell来执行test.sh中的命令。该test文件也可以无”执行权限”./命令用法./test.sh作用:打开一...转载 2018-08-02 09:23:57 · 1206 阅读 · 0 评论 -
shell中for循环文件路径查找
查看某目录下个文件的属性for file in for file in /home/username*doif [ -d "$file" ]then echo "$file is directory"elif [ -f "$file" ]then echo "$file is file"fidone输出结果:/home/username/Desktop is ...转载 2018-08-07 15:16:34 · 6697 阅读 · 0 评论 -
shell命令echo和read总结
echoecho输出的字符串总结 引号 能否引用变量 能否引用转移符 能否引用文本格式符(如:换行符、制表符) 单引号 否 否 否 双引号 能 能 能 无引号 能 能 否readread 命令一个一个词组地接收输入的参数,每个词组需要使用空格进行分隔;如果输入的词组个数大于需要的参数个数,则多出...转载 2018-08-03 11:20:16 · 1421 阅读 · 0 评论
分享