Tag Archives: guide

Expect to the rescue!

When you can’t pipe an input file to automate a process, especially when you need to enter a password such as ftp-ing to some server e.g.:

ftp user@ftp.myhost.com < myFTPCommands.txt

The above fails when ftp asks for a password. This is where expect comes to the rescue! e.g.:

#myExpectFile.exp

#Disable’s expect’s default 10 seconds timeout
set timeout -1

spawn ftp user@ftp.myhost.com
expect [...]

Installing Snippy on CentOS 5

I wanted to install something like Pastie at my workplace to easily share snippets of code privately, instead of sharing it to the whole wide world. There are some open source alternatives such as LodgeIt and pastebin but for some unknown reasons, I could never get it to set up properly.
Then I came [...]

Opening New terminal in Leopard in the Current or Other Specified Directory

Found this tip over at macosxhints.com and also tlrobinson.net to be very useful. I don’t know how many times I’ve always open a new terminal with cmd-n and slowly cd into the current directory of the other terminal window.
However, both guides had something lacking from each other. The guide from macosxhints.com can’t be completed because I can’t [...]