换了zsh
作为十几年的tcsh拥趸,我最近改信了zsh。
共5篇文章。
作为十几年的tcsh拥趸,我最近改信了zsh。
第一个脚本(1.sh):
#!/bin/sh
echo test
exit 1测试命令:./1
csh:
./1.sh | grep test && echo e
testsh:
./1.sh | grep test && echo e
test
e学习一种语言最快的方法就是逼自己干什么事情的时候都用它——有一个利用了Python来实现的shell——iPython,可以用来代替默认的shell。
The script I am using for updating my own website(s) is not quite complex, it is here:
|
Of course you need some CVSROOT scripts to get it to work, but the idea is not too complex.
grep cgi-bin scripttime | cut -f6,8 -d’ ’ | sed -E s/\\\?.+//g | grep cgi-bin | sort | uniq -c | sort > statis
Where scripttime is a log with %T (script execution time) log. The above command line will obtain execution time, script name from log, then sort it by the execution time, then have a counted unique.