脚本语言
文章平均质量分 74
buptlsj
这个作者很懒,什么都没留下…
展开
-
linux中用shell获取昨天、明天或多天前的日期:
在Linux中对man date -d 参数说的比较模糊,以下举例进一步说明: # -d, --date=STRING display time described by STRING, not `now’ [root@Gman root]# date -d next-day +%Y%m%d #明天日期 20091024 [root@Gman root]# date -d last-day...原创 2010-08-01 11:31:49 · 167 阅读 · 0 评论 -
shell的初学者入门知识
shell判断文件,目录是否存在或者具有权限 0 推荐 #!/bin/sh myPath="/var/log/httpd/" myFile="/var /log/httpd/access.log" #这里的-x 参数判断$myPath是否存在并且是否具有可执行权限 if [ ! -x "$myPath"]; then mkdir "$myPath" fi ...原创 2010-08-01 11:46:15 · 89 阅读 · 0 评论