running scripts on Ubuntu 101

These instructions show a simple script that returns “Hello world”.

I moved my script to /usr/local/bin/ (as recommended here) so it can run without the full path.. pretty cool.

Notes.

I can create aliases:

alias l='ls -l'

as well as functions:

today() {
    echo -n "Today's date is: "
    date +"%A, %B %-d, %Y"
}

I added a bin directory to my home directory, and added it to .bashrc to allow execution from there:

export PATH=$PATH:directory

Leave a Reply

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