
Shell
dotuian
这个作者很懒,什么都没留下…
展开
-
for/if书写范例
for loop in `cal`do echo $loopdoneif [ -f '002.sh' ]then echo "002.sh存在"else echo "002.sh不存在"fi原创 2013-02-21 17:19:08 · 378 阅读 · 0 评论 -
获取页面中的图片文件地址
命令 curl news.baidu.com | grep -Eio '(http|ftp|https)://[A-Za-z0-9_./]+(.jpg|.png|.gif)' http://news.baidu.com/iphone/img/loading_3.gifhttp://h.hiphotos.baidu.com/news/pic/item/5d原创 2013-10-31 17:46:29 · 1004 阅读 · 0 评论 -
根据文件的修改时间来分类文件
#!/bin/bash# exctute# ./mod.sh file_type input_folder output_folder# ./mod.sh *.txt /tmp /data/# paramater count if [ ! $# -eq 3 ]; then echo "[ERROR] error paramater." exitfi# file原创 2013-11-12 14:59:36 · 898 阅读 · 0 评论 -
在Cygwin中安装PHP
1.在Cygwin中安装apt-cyg包管理工具$ wget http://apt-cyg.googlecode.com/svn/trunk/apt-cyg$ chmod +x apt-cyg$ mv apt-cyg /usr/local/bin2.安装PHP包apt-cyg install php -m ftp://ftp.cygwinports.org/pub/cygw翻译 2014-06-11 10:16:43 · 4293 阅读 · 0 评论