![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
unix shell 编程
fancw
勤奋
展开
-
shell 编程 重定向 read
#!/bin/bash File=/etc/fstab # File和等号中间不能空格 Result=1.test { read line1 read line 2 } { echo "$line1" echo "$line2" } > $Result原创 2012-06-25 17:01:32 · 1203 阅读 · 0 评论 -
bash 的判断文件操作语句
-d file file存在并且是一个目录 -e file file存在 -f file file存在并且是普通文件 -r file file有读权限 -s file file存在且不为空 -w file file写权限 -x file file有执行权限 -a FILE ] 如果 FILE 存在则为真。 [ -b FILE ] 如果 FILE 存在转载 2012-06-26 16:06:28 · 3797 阅读 · 0 评论