I am having an issue with my .bash_profile script.

If I simply have the line

source ~/sh/bashmarks.sh

the bashmarks.sh script runs as expected.

However, if I add an alias

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

I get the message:

No such file or directory/bashmarks.sh

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

1 Answer 1


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

  • 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. Jun 18, 2012 at 17:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .