Sunday·20·May·2007
autossh vs TCP resetter //at 00:49 //by abe
LUG-Camp 2007 in Interlaken is nearly over, and I’m reading my mail as usual using ssh, screen and mutt on the server. But the ssh connection resets every few minutes. According to the LUSC people (who are running the gateway) some script kiddie is running a TCP resetter somewhere in the network.
I remembered that I read about autossh in the Debian package list once a while and that it sounded cool but I had no use for it yet. Until now.
I’m writing this over the same crashing ssh connection and I’m typing without taking big notice of the quite often occurring connection resets:
autossh noone.org -t 'screen -rd'
It just works. :-)
Tagged as: autossh, Events, Interlaken, LUG-Camp, LUSC, mutt, screen, SSH, tunneling
1 comment // show without comments // write a comment //
Related stories
Friday·20·October·2006
Nice Shell Bloomer //at 16:39 //by abe
While looking for users which still have “.”
in their path, I found the following nice bloomer:
PATH=``$PATH:.:$HOME/bin''
It’s obvious what the user tried to do. But why the fuck does this (more or less man or info page alike) quoting syntax work?
It took me a moment to realise that this kind of “quoting” works in nearly all Unix shells: The two backquotes as well as the two single quotes become an empty string and are therefor completely useless in this case.
The user probably read some uglily localized man or info page (like
the German ones in Debian Sarge) and did some copy and paste to his
.bashrc. And since it “worked” he didn’t see
any reason to change it again.
Tagged as: Admin, bash, DAU, Debian, Documentation, ETH Zürich, Localisation, man page, Sarge, Shell, WFM, WTF
0 comments // show without comments // write a comment //
Related stories
Thursday·02·March·2006
Shell Efficiency Talk at DaLUG today //at 02:29 //by abe
I just uploaded the slides for my shell efficiency talk at the Darmstadt Linux User Group (DaLUG) today at 18:30 CEST at the Technical University of Darmstadt. (The talk will be held in German.)
I will also hold a workshop about the same subject on the 29th of
October 2005 at Linux-Info-Tag Dresden. (Will also be held in German.)
Tagged as: ash, bash, DaLUG, Darmstadt, ksh, Linux, Lynx, Shell, Talk, tcsh, Text Mode, zsh
0 comments // show without comments // write a comment //
Related stories
Probably moving from tcsh to zsh. Bash sucks. //at 02:29 //by abe
The grml-T-Shirt, Alfie was wearing at the Debian QA Meeting in Darmstadt this weekend reminded me, that I wanted to download a grml-ISO. While looking for the ISO I found a link to the grml zsh Reference Card. Beneath the links to the reference card there were a pointer to zsh-lovers, “a small project which tries to collect tips, tricks and examples for the Z shell.”.
There were a lot of nice tricks mentioned, e.g. redirection to
multiple files. So I spawned a zsh and checked for the main feature,
which keeps me using tcsh instead of bash: History Tab Completion. And
see there: zsh does History Tab Completion. And even nicer:
Completion results don’t create a new prompt, but just show up (and
vanish again with e.g. ^C) beneath the prompt while the
prompt only moves (up) if there’s not enough space for all the
possible completions. Some kind of meta-cool is the set of
configuration variables starting with CSH_JUNKIE_. Guess,
I am such a (t)csh junkie. ;-)
And global aliases seem also a very fine (but also very dangerous)
feature. Think of cd ... just doing what you want it to,
namely cd ../... As well as the advanced history handling
which includes incremental sharing with multiple simultaneous
shells. Or the spelling corrections based on keyboard layout.
On the other hand, zsh offers everything from bash I missed in tcsh:
^R and usable loops (mostly while (true); do
...) on the command line. The only thing none of the three
shells can is Mind Tab Completion. ;-)
The zsh page from Adam Spiers seems to be good source for informations about the zsh. Another nice collection of zsh tips (which often also work in other shells) was in the links section of the grml zsh page.
Funnily several people tried to convince me to use zsh before, but
they just didn’t use the right arguments. :-) So it looks as if I
found the right arguments by myself and should really give zsh a try
after 10 years of tcsh. Although I already found something less
amusing in zsh: echo '\n' and echo "\t"
behave both very strange, but I still hope, I find the switch to turn
it off…
But my upcoming shell efficiency talk will definitely not only feature bash and tcsh but also zsh.
Now playing: R.E.M.
— Losing my religion
Tagged as: bash, Now Playing, Religion, Shell, tcsh, zsh
0 comments // show without comments // write a comment //
Related stories
Next planned shell efficiency talks //at 02:28 //by abe
Today is the deadline for proposing talks for this year’s LinuxTag (3rd to 6th of May, Wiesbaden, Germany) and last week was the deadline for talk proposals for this year’s Chemnitzer Linux-Tage (CLT, 4th and 5th of March 2006, Chemnitz, Germany). For both events I submitted my already at other events held Shell Efficiency talk. For LinuxTag I marked the proposal as “German preferred, English possible”, so if they ask for the English version, I’ll offer the slides in English, too, of course. I’ll probably also build a DocBook version of the talk, since LinuxTag prefers the DocBook format.
But even if these both talk proposals are not accepted, I’ll be on both events together with the rest of the Symlink crew and have fun! ;-)
Additionally I will hold the talk a few days before CLT on Thursday the 2nd of March 2006 at the New Thinking Store in Berlin-Mitte, Tucholskystraße 48 at 19:30 (which is unfortunately in parallel to this year’s German Perl Workshop from 1st to 3rd of March 2006 in Bochum). The entrance to the talk is free. (Thanks to Sven Guckes for suggesting this talk and bringing me in contact with New Thinking.)
Now Playing: Jethro Tull — Orion
Tagged as: Berlin, Chemnitz, CLT, DocBook, Events, LinuxTag, Now Playing, Shell, Symlink, Talk, Text Mode, Wiesbaden
0 comments // show without comments // write a comment //
Related stories
Multiple Move & Co. //at 02:20 //by abe
nion’s
blog made me notice that many people don’t know mmv (multiple move), which approximately
works like this:
mmv '*.htm' #1.html mmv '*.foo.*' #1.#2.bla
Additionally, mmv also can copy, link or
even append files when called as mcp,
mln or mad
respectively with the appropriate command line options.
When I told nion in IRC on #debian.de about mmv, HE pointed me to the Perl
script /usr/bin/rename, which is in Debian’s perl
package and therefore installed on nearly every Debian system by
default. It moves files by applying perl subsitutions to file names:
rename 's/\.htm$/.html/' *.htm rename 'y/A-Z/a-z/' *
Being curious, if the newly found tool is not only available in
Debian, I looked on a SuSE 9.0 box and indeed, I also found there a
/usr/bin/rename. But — surprise,
surprise — it’s not a Perl script but an ELF binary. And although it
does similar things than mmv and Debian’s
rename, it is the simplest of the three
commands:
rename .htm .html *.htm rename foo foo00 foo? rename foo foo0 foo??
Note to my self: Nice add-on for your command line efficiency
talk.
Tagged as: Debian, Linux, Open Source, Other Blogs, Shell, SuSE
0 comments // show without comments // write a comment //
Related stories
Wikipedia at your fingertips //at 02:07 //by abe
Via nion’s blog I got notice of two other blog entries of two people of whom each wrote a shell script to display Wikipedia articles as plain text in a pager.
While the first one called wiki2 queries Google and fetches then the first Wikipedia hit there, the second one (funnily just called wiki) queries Wikipedia directly, supports different Wikipedia languages and has a lot of other nice features.
Since the idea and especially the second script definitely belongs to the group of programs you never thought about, but, when you found it, you knew, you missed it until now, I decided to use it as the first program, I want to package for the Debian project to be included in the next release which will be called Etch.
Because of “wiki” being a quite ambigous name, I plan to name the package wikipedia2text.
Tagged as: Hacks, Lynx, Open Source, Other Blogs, Shell, Text Mode, Wikipedia
0 comments // show without comments // write a comment //



