1

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

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

1
  • 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. – John Livermore Jun 18 '12 at 17:42

You must log in to answer this question.

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