From: Brian Candler Date: 2010-01-27T19:14:46+09:00 Subject: Re: Why does `source .bashrc` complain "command not found"? Adam Akhtar wrote: > Thank you very much for both of your replies. I just tried > > `/bin/bash -c 'source whatever'` > > and it worked! Fantastic. > > But i don't understand if source isnt a known command then how come when > i go to my command line and type source it works fine? because your login shell is /bin/bash not /bin/sh (grep for your username in /etc/passwd) The correct solution is not to use bash-specific functionality: `. whatever` should work just fine. By doing this you'll help your script to be portable to other operating systems, like *BSD which tend not to install bash by default because of its restrictive GPL licence. -- Posted via http://www.ruby-forum.com/.