* Karthik Vishwanath <[EMAIL PROTECTED]> writes:

> On 1 Apr 2000, Steve Youngs wrote:
>> BTW, are you having problems with your aliases or were you just curious?

> Just curious. I keep adding new aliases and was wondering about this. Is 
> there a "better" way than aliases or its not worth worrying about? 

Depends on what you are doing.  Sometimes an alias is the answer,
sometimes a shell script, sometimes a function, sometimes a symlink.
And sometimes, a combination of any of them.

For example...(alias)
My wife and I both use the same computer and I'm always leaving things
half done in X and my wife likes to use X as well but doesn't like the
way I have things set up.  So instead of teaching her how to save
whatever it was that I was doing, quit out of my Xwindow and then
start her own, I just set a couple of aliases.  One for me to always
start X on display 0, and one for her to always start X on display 1.
That way we can have two copies of X running at the same time. [1]

For example...(alias, function, symlink)
I use IRC a fair bit and I have a small program that generates a
random quote that I use for the IRC user name.  The IRC user name is
set via the environment variable 'IRCNAME' and I like to have a
different IRCNAME each time I log into IRC.  So I have a function that
sets the value of 'IRCNAME' to the output of the random quote program
and then runs BitchX (my IRC client).  I have also aliased the name of
my IRC client to the name of the function.  So when I type 'bitchx' [2]
I log into IRC with a different IRCNAME each time.

If you suffer from insomnia, have a read through...

man bash
info -f /usr/info/bashref.info.gz

And for some good examples of using functions, have a look at...

less /usr/doc/Linux-HOWTOs/Bash-Prompt-HOWTO.gz

===========================
Want to really learn Linux?
   ... Install Slackware
===========================


Footnotes: 
[1]  For those who are interested those aliases are...
     alias startx='startx -- :0'
     alias startx='startx -- :1'

[2]  I've symlinked /usr/local/bin/BitchX to /usr/local/bin/bitchx so
     I don't have to worry about the capitalization.


-- 
|---<Regards, Steve Youngs>-------------------------------------|
|                    Genius is the ability to                   |
|              reduce the complicated to the simple             |
|------------------------------------<[EMAIL PROTECTED]>---|

-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.linux-learn.org/faqs

Reply via email to