移除多余的行可以用:
$ sed ‘/^$/d’ input.txt > output.txt
$ grep -v ‘^$’ input.txt > output.txt
假如你需要写一个 shell 用来执行另外的程序, 那么就需要把命令行下的参数传递给那个程序. Bash下正确的做法是使用 $@. 并且需要增加括号. 比如
grep “$@”
在python 2.6的后续版本中加入了 -B 选项, 来禁止产生不需要的.pyc文件. (比如在开发状态你不期望产生多余的.pyc文件来扰乱版本控制系统)
[ -n “${VAR+x}” ] ## Fails if VAR is unset
[ -n “${VAR:+x}” ] ## Fails if VAR is unset or empty
[ -n “${VAR-x}” ] ## Succeeds if VAR is unset
[ -n “${VAR:-x}” ] ## Succeeds if VAR is unset or empty
DIFF算法论文 by EUGENE W.MYERS
An O(ND) difference Algorithm and Its Variations
本篇是比较经典的学习用c++开发php扩展的教程, 可惜出处已经不可访问.
和夏令时有关的算法
基于css的计算单位的比较
本文来自于大名鼎鼎的O’Reilly出版的《using drupal》, 有修改. 请务必购买…英文版…
