Thanks, but I pretty comfortable with all of the links and have done research on the differences, I'm just concerned with how bioinformaticians use their bash profile files and if people have a preference for one over the other. I do appreciate the links you have provided.
Excuse me if this is a stupid question, but I was searching through the archives and couldn’t find it discussed previously. I was going through a couple of previous posts: (here and here) on people’s preferred aliases and adding some of these useful aliases to my .bash_profile.
Let me preface this by saying I use Mac OS X. When adding these aliases, I realized I’ve previously put aliases in both my .bash_profile and my .bashrc file on my computer, but there wasn’t really any rhyme or reason to the file I used at the time.
I call upon my .bashrc file with:
if
[ -f ~/.bashrc ];
then
source ~/.bashrc fi
from within my .bash-profile file.
I know (essentially) the difference between the .bash_profile and .bashrc files on a Mac, but I think I will put all my aliases in my .bashrc file, mainly so I can transfer it to remote computers (all unix based) instead of modifying each .bashrc file for each computer I login to?
In other words, for Mac users, what do you have in your .bashprofile and your .bashrc files? I have my PATHs in my .bashprofile and aliases in my .bashrc, should I put aliases in both or is this just a waste of my time and processing speed? How do you have these files organized so you call your scripts up in the most efficient way? Efficient in terms of your organizational sanity and also computational speed? Does computational speed even matter in this context? ...or do I even need the .bashrc file on my Mac?
Thanks so much for your input in advance!
1 answer
Covered pretty well over in StackExchange:
About .bash_profile, .bashrc, and where should alias be written in?
What's the difference between .bashrc, .bash_profile, and .environment?
Where to find the .bashrc file on Mac OS X Snow Leopard and Lion?
Log in to answer this question.
On my personal machine, I add my aliases to
/etc/bashrc. I also have my bash prompt settings and a few key bindings there, as well.your question is not related to bioinformatics. I'm closing it.
Pierre, can you clearly explain to me how this is not related to bioinformatics? I want to know where to put my bash shell aliases so I can most efficiently use them?
IMHO, your question does not focus on bioinformatics: it could have been posted on stackoverflow.com, unix.stackexchange.com etc... but I may be wrong and another admin might feel free to reopen your question.
Thanks for your reply. I just want to be clear which forum is appropriate in the future.