随笔分类 -  Shell

Shell Programming
摘要:最近在搞whenever时看到可以用cron语法设置定时任务。所以研究了下cron 语法。every'0 0 27-31 * *'do command"echo 'you can use raw cron syntax too'"endcron命令,用于设置周期性被执行的指令。格式#文件格式说明#—... 阅读全文
posted @ 2015-07-15 09:08 卜海清 阅读(335) 评论(0) 推荐(0)
摘要:关于shell中的for循环用法很多,一直想总结一下,今天网上看到上一篇关于for循环用法的总结,感觉很全面,所以就转过来研究研究,嘿嘿…1、 for((i=1;i<=10;i++));do echo $(expr $i \* 4);done2、在shell中常用的是 for i in $(seq ... 阅读全文
posted @ 2015-01-25 10:59 卜海清 阅读(186) 评论(0) 推荐(0)
摘要:最近一直有在想如何能在Vim里实现迭代查找(recursively find).今天看到了一文,需要用**/的方式表达迭代的语义。syntax:在所有的cpp文件里查找YourPattern:vimgrep YourPattern **/*.cpp原文链接:http://www.refreshinglyblue.com/2009/02/17/recursive-searching-in-vim-w... 阅读全文
posted @ 2010-11-29 21:45 卜海清 阅读(308) 评论(0) 推荐(0)
摘要:The shell treats several parameters specially. These parameters may only be referenced; assignment to them is not allowed.*Expands to the positional parameters, starting from one. When the expansion o... 阅读全文
posted @ 2010-10-11 16:19 卜海清 阅读(454) 评论(0) 推荐(0)