换了zsh
作为十几年的 tcsh 拥趸,我最近改信了 zsh。
基于 Robby Russell 的 Oh My ZSH 搞了一套自己的 Oh My ZSH,可以用 ZSH_THEME=“delphij” 来启用我的配置,其外观、行为大致与我之前的 csh 配置相同。
经过PGP签名的tag版本可以在 这里 找到(请自行使用安全的方法获得我的PGP公钥)。
共 5 篇文章。
作为十几年的 tcsh 拥趸,我最近改信了 zsh。
基于 Robby Russell 的 Oh My ZSH 搞了一套自己的 Oh My ZSH,可以用 ZSH_THEME=“delphij” 来启用我的配置,其外观、行为大致与我之前的 csh 配置相同。
经过PGP签名的tag版本可以在 这里 找到(请自行使用安全的方法获得我的PGP公钥)。
第一个脚本(1.sh):
#!/bin/sh
echo test
exit 1
测试命令:./1.sh | grep test && echo 1
csh:
./1.sh | grep test && echo e
test
sh:
./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 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.