摘要:
举例 #!/bin/sh myFile="/var /log/httpd/access.log" if [ ! -e "$myFile" ]; then touch "$myFile" fi -e和-f的区别是,-f代表常规文件(regular file),-e代表所有任何类型文件参考如下:-e f 阅读全文
posted @ 2017-01-07 16:37
迷茫的小孩
阅读(810)
评论(1)
推荐(0)
|
摘要:
举例 #!/bin/sh myFile="/var /log/httpd/access.log" if [ ! -e "$myFile" ]; then touch "$myFile" fi -e和-f的区别是,-f代表常规文件(regular file),-e代表所有任何类型文件参考如下:-e f 阅读全文
posted @ 2017-01-07 16:37
迷茫的小孩
阅读(810)
评论(1)
推荐(0)
摘要:
两个都是获取stdin,并在EOF处结束stdin,输出stdout。 但是<<-是什么意思呢? 先来看man中的说明: If the redirection operator is <<-, then all leading tab characters are stripped from inp 阅读全文
posted @ 2017-01-07 15:51
迷茫的小孩
阅读(42113)
评论(2)
推荐(6)
|