Simplifying getting started with the Command Line

Chris Robinson fabricator4 at yahoo.com
Sun Apr 10 13:22:36 UTC 2011



---------------------------------------------------------------
From: Nathaniel <nathaniel73 at gmail.com>

To: Chris Robinson <fabricator4 at yahoo.com>
Sent: Sun, 10 April, 2011 9:51:50 PM
Subject: Re: Simplifying getting started with the Command Line


I'm sure this would be possible.
----------------------------------------------------------------

Absolutely, in about three lines of code.

If you want to see what it looks like, paste the following into your ~/.bashrc 
file:

####################################
# Nathaniel's one time man -k prompt
if [ ! -f ~/.bashflag ]; then
    echo "First time here? try man -k <keyword> to get you started"
    echo "Also Google bash tutorial"   
    echo Done > ~/.bashflag
fi
####################################

make a backup copy of your .bashrc file first:

cp ~/.bashrc ~/bashrc.bkup

and when you're finished copy the backup back again:

cp ~/bashrc.bkup ~/.bashrc

Then remove the flag file that was created:

rm ~/.bashflag

The use of .bashflag is a bit of a kludge, done because I really didn't wan't to 
mess with any of the bash init files.  Note that files starting with a '.' are 
hidden files.


Chris.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-au/attachments/20110410/7d7fa8d3/attachment.html>


More information about the ubuntu-au mailing list