Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

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?

share|improve this question
add comment

1 Answer 1

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. –  John Jun 18 '12 at 17:42
add comment

Your Answer

 
discard

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.