Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am having an issue with my .bash_profile script.

If I simply have the line

source ~/sh/

the script runs as expected.

However, if I add an alias

source ~/sh/
alias gs='git status '

I get the message:

No such file or directory/

I should be able to add additional commands after I specify the script correct? What could be wrong here?

share|improve this question
up vote 1 down vote accepted

That sounds like a line-endings issue. Make sure your bash file is using UNIX \n instead of Windows \r\n.

share|improve this answer
Indeed it was. I am learning the Sublime text editor and the default line ending option was set to 'default' which I assumed meant LF. Changing the setting to 'unix' fixed the issue. – bigwavesoftware Jun 18 '12 at 17:42

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.