Skip to content

Category Archives: Linux/Unix

GNU chess and xboard on eee PC

The eee PC is a cool little machine. It boots up in 20 seconds, weights about a kilo and it runs Linux. What else do you want in a netbook ? A chess program would be a nice addition. Here I’ll show you how to install GNU chess and xboard. First download the following packages [...]

Korn shell way of checking if environment variable is set

Sometimes you have to check if a variable is set and exit if it’s not. The following code does it in a nice and simple way : error_mess="This environment variable should be set"   : ${ORACLE_HOME:?$error_mess} The output looks like this : ./script.sh[3]: ORACLE_HOME: This environment variable should be set The script exits after checking [...]

Automating FTP

Here’s how you automate FTP : ftp -v -n hostname << EOF user usuario password bin put filename bye EOF With thanks to this post.

HP Unix info

This is useful on HP Unix machines. It just prints out a few pieces of data of the machine. echo "HP Unix version : " `uname -a` echo "Model : " `/usr/bin/model` echo "Number of processors : " `/usr/sbin/ioscan -kf | grep processor | wc -l` An example output would be be : HP Unix [...]