General

An IRC client in 40 lines of shell script

While hanging out in #IndiaTwits,  Shyam aka codelust brought to my attention of this post in Kragen hacks Mailing list.

So I’m installing an OS on my laptop, and for whatever reason, the Debian Etch install disk thought it would be a good idea to initialize the whole disk to random data *before* rather than *after* the rest of the install. Writing to the whole disk takes a long time — a few hours — and so I’m left with the Debian netinst environment to play with. So I decided to IRC. Unfortunately, the only programming language I could find is sh, and there don’t seem to be any IRC clients. And I can’t get the ssh client to work — I was able to install the ssh client from the udeb on the CD-ROM with udpkg -i path/to/openssl-client-whatever.udeb. But it depends on libnsl.so.1, and I don’t know what udeb I have to install to get that. So I wrote my own IRC client in shell. The output is a little ugly, and there’s no line editing or multiple window support, but otherwise it’s just like any other IRC client to use. Almost.

Continue reading the article and get the shell script in the mailing list

Edit: Fixed the URL. Thanks to Aalaap for pointing out the error

1 Comment

Leave a Reply

Your email address will not be published. Required fields are marked *