Shell

共 5 篇文章。

换了zsh

• Life

作为十几年的 tcsh 拥趸,我最近改信了 zsh。

基于 Robby Russell 的 Oh My ZSH 搞了一套自己的 Oh My ZSH,可以用 ZSH_THEME=“delphij” 来启用我的配置,其外观、行为大致与我之前的 csh 配置相同。

经过PGP签名的tag版本可以在 这里 找到(请自行使用安全的方法获得我的PGP公钥)。

阅读全文… ( 本文约 331 字,阅读大致需要 1 分钟 )

sh与csh中的算符优先顺序

• Cheatsheets

第一个脚本(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

阅读全文… ( 本文约 170 字,阅读大致需要 1 分钟 )

用 iPython 做shell

• Development

学习一种语言最快的方法就是逼自己干什么事情的时候都用它——有一个利用了Python来实现的shell——iPython,可以用来代替默认的shell。

阅读全文… ( 本文约 193 字,阅读大致需要 1 分钟 )

A script to update site periodically through CVSup(R)

• Development

The script I am using for updating my own website(s) is not quite complex, it is here:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
#!/bin/sh
# Detect and update the files
#
# $Phantasm$

CVSROOT="/home/ncvs"
SUPFILE="/home/delphij/cvsup/supfile-delphijweb"
LOCKFILE="/home/delphij/cvsup/cvsup-lock"

if [ -f ${CVSROOT}/CVSROOT/commitlogs/have_updates ]
then
	rm ${CVSROOT}/CVSROOT/commitlogs/have_updates
	cvsup -1gL 2 ${SUPFILE}
fi

Of course you need some CVSROOT scripts to get it work, but the idea is not too complex.

参与评论