file(’new’,'w’).writelines(set(file(’old’)))
easy, powerful!
1 [ -h file ], true if the file is a soft link. (guess from hadoop-deamon.sh)2 echo $?, return the last command exit status.
code snippet from hadoop-deamon.sh
this=”$0″while [ -h "$this" ]; do ls=`ls -ld “$this”` link=`expr “$ls” : ‘.*-> \(.*\)$’` if expr “$link” : ‘.*/.*’ > /dev/null; then this=”$link” [...]
最近用python写了个同步del.icio.us和本地ie收藏夹的脚本 可是总会报被 throttled 的错, 按照del.icio.us的api说明, 应该是我过于频繁的使用它的api了 但是我没有啊,我都是每隔2秒才提交一次的,无辜啊 :) 最后,没想到是由于有个收藏项为GFW封杀对象, del.icio.us无法访问此连接,所以无法收藏! 呵呵 伟大的GFW, 没想到有一天会碰到你引起的bug