PLEX86  x86- Virtual Machine (VM) Program
 Plex86  |  CVS  |  Mailing List  |  Download  |  Linux  |  Newsgroups

Want to save my alias in Linux


Your Ad Here

Your Ad Here

On 2006-04-08, Japan

Too many is probably correct. Under the ALIASES section of the bash man page, it says, "For almost every purpose, aliases are superseded by shell functions."

Consider using functions rather than aliases, especially for more complex aliases. Functions can be exported so that child shells can use them without their being reloaded; aliases cannot.

Whether you use aliases or functions, they need to be stored in a file that is sourced when your shell is invoked.

Bash sources different files depending on how it is invoked. Login shells sourceetc-profile and ~-.bashprofile; other interactive shells source ~-.bashrc.

Change in ASCII graphics
Laurenz Albe AHA! Sort of. BTW, before I originally consulted this list, I had performed a visual inspection...

Other files may be sourced, but that is dependent on their being called by one of the scripts mentioned above. It is not a good idea to depend on (for example)etc-bashrc or files inetc-profile.d being sourced. In fact, I comment them out as soon as I have installed any distro which uses them.

It is common for ~-.bashrc to be sourced by ~-.bashprofile with lines like this:

Dual boot Do I need to install DSL softwares in both Winows XP & Linux
When you installed Mandriva 2006, (how) did you configure your network stuff? It can only be almost automagic. You have to enter a few things manually. I installed Mandriva 2006 on...
Can I buy a linux account 851
On Sun, 09 Apr 2006, in the Usenet newsgroup comp.os.linux.misc, in article The rule is quite common for a number...

if -f $HOME-.bashrc ; then source $HOME-.bashrc fi

If you want ~-.bashrc to be sourced by all interactive shells, this is a good idea, and you can put your aliases and function in ~-.bashrc.

Alternatively, you can put your aliases and functions in a separate file or files and source it (or them) from both ~-.bashprofile and ~-.bashrc.

-- Shell Scripting Recipes: My code in this post, if any, A Problem-Solution Approach is released under the 2005, Apress GNU General Public Licence



Your Ad Here

List | Previous | Next

Change in ASCII graphics

Linux groups from Newsgroups

The #1 Usenet Provider on the Internet

Is this guy kidding