A gotcha with Bash on Ubuntu 8.04
Suppose that you have an Ubuntu 8.04 system where you have opted to make/bin/sh be bash, the way it used to be in 6.06, and you have an accountwith /bin/sh as the login shell (for example, you created it with plain useradd ). So you log in to the account and everything seems normal andbash-y, until you try to do filename completion and get:
$ cd / -sh: <( compgen -d -
Solving unexposed types and the limits of duck typing
When I ran into the issue of the re module not exposing its types , I considered several solutions to my underlyingproblem of distinguishing strings from compiled regular expressions.For various reasons, I wound up picking the solution that was the leastannoying to code; I decided whether something was compiled regularexpression by checking to see if it had a .match attribute.
This is the traditional Python approach to the problem; don't checktypes as such, just check to see if the object has the behavior thatyou'
反平反《下女》
A shell script thing that I have learned the hard way
Here is a note to myself about shell scripting, especially things that Iwrite on the fly on the command line: under no circumstance should I useany ' for ... ' loop index variable apart from $i .
I say this because, based on experimental evidence so far, I amcompletely sure to use $i in the body of the for loop, no matterwhat sensible variable name I picked as the loop index in the for statement. And, of course, the Bourne shell will let me
說服的勝利者
可不是嗎?令得一個人失態地說出這種賭氣的說話,他必然是欠缺了對人的體察,以為憑著充份的道理,就可以說服得別人五體投地?說服,本
從官恩娜到speed dating
某個下午我在澳大圖書館讀李維史陀
川澄舞
川澄舞是誰?或許我並不知道。川澄舞的造型是一雙兔耳、粉銀長髮、白色和服、持一把長長的銀西洋劍,騎斑紋大虎,平時不多話,往往回人以一個大笑臉或者大哭臉。川澄舞的真實面目沒