Mercurial > repo
annotate bin/CaT @ 3981:866c7045ad18
<shachaf> addquote <zzo38> I do sometimes work on Linux computer. I think it is set to en.UTF-8 by default although on my account I have changed it to the C locale, disabled Unicode translation, and loaded a CP437 font. <zzo38> This improves the operation of the system.
author | HackBot |
---|---|
date | Mon, 04 Nov 2013 05:13:31 +0000 |
parents | d9ab4c1c05dd |
children |
rev | line source |
---|---|
2351
cedbde4c8d40
<oerjan> (echo \'#!/usr/bin/env python\'; echo \'print (lambda s: "".join([(s[i].upper() if i%2==0 else s[i].lower()) for i in range(len(s)) ]))(open("/dev/stdin").read())\') >bin/CaT; chmod a+x CaT
HackBot
parents:
diff
changeset
|
1 #!/usr/bin/env python |
3868
5909a6756b89
<oerjan> sed -i -e \'1aimport sys\' -e \'s/print/sys.write/\' bin/CaT #Let\'s see how much i messed this up
HackBot
parents:
2351
diff
changeset
|
2 import sys |
3870
d9ab4c1c05dd
<oerjan> sed -i \'s/write /write (/;s/read(/read()/\' bin/CaT
HackBot
parents:
3869
diff
changeset
|
3 sys.stdout.write ((lambda s: "".join([(s[i].upper() if i%2==0 else s[i].lower()) for i in range(len(s)) ]))(open("/dev/stdin").read())) |