Search This Website

Thursday, 24 December 2009

Shell Scripting

To Use $RANDOM in Linux Ubuntu:

  1. If you're using Edgy, you will have to make the first line of your script:
#!/bin/bash

  1. I do this for all of my scripts, and to make it global as well run this command:
$ sudo dpkg-reconfigure dash

and answer no. Edgy's default shell interpreter is Dash, not Bash. That's why the $RANDOM did nto work before that.