.bash-profile

about .bash_profile, .bashrc, and where should alias be written in?

it seems that if i use alias ls='ls -F' inside of .bashrc on Mac OS X, then the newly created shell will not have that alias. I need to type bash again and that alias will be in effect. and if i log into linux on the hosting company, the .bashrc has a comment line that says: for non-login shell and .bash_profile has a comment fo...

if .bash_profile usually source .bashrc any way, why not just use .bashrc ?

it seems that we will put source ~/.bashrc in our .bash_profile anyway. So why not just use one file, say .bashrc ? ...

How to make emacs shell execute init file automatically?

My bash init script (~/.profile) contains important initializations, but whenever I use shell-command or compile in emacs, that init file is not read, and without those initialization my bash commands in emacs will fail :( How do I force emacs to execute my init file for the shell that it's using for shell-command? Clarification: I'm no...

Bash Command which Rails does Not Find

Passenger says: Ruby on Rails application could not be started ... Command 'exiftool' not found (MiniExiftool::Error) When I login with ssh and I type exiftool in any directory the command works properly. I have the follwing line in both .bash_profile and .bashrc export PATH=$PATH:$HOME/bin Is it possible that Rails (MiniExiftool pl...

fixed width bash prompt

I'd like to set my bash prompt to a fixed width, and make up the difference in space before the $, so whether long or short, my prompt remains the same width: [name@host] ~/Directory/Dir...Another/LastDir $ [name@host] ~/Directory(branch) $ Currently, in a short directory path my prompt looks something like this: [nam...

Reload .profile in bash shell script (in unix)?

Hi all, I'm new to bash shell scripting, and have come across a challenge. I know I can reload my ".profile" file by just doing: . .profile but I'm trying to the same in a bash script I'm writing and it is just not working. Any ideas? Anything else I can provide to clarify? Thanks ...

How to add/use a variable to my bashrc file?

I'm a newbie to Linux operating system I need to do the following:- I have multiple projects under "~/myprojects" Think of like >ls ~/myprojects project1 project2i newproject project_possible.... All my projects have a fixed structure see as below:- ls ~/myprojects/ src lib inc common test_scripts (all these are directories hav...

Shell Bash: Passing argument to alias

Hello, Is it possible to do the following: I want to run the following: mongodb bin/mongod in my bash_profile I have alias = "./path/to/mongodb/$1" Thanks everyone! ...