Sign up ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a file with the content:

export PATH=$PATH:$HOME/PyModel/bin

When I try to run this file it opens with the text editor. I want to run this file so that the path is appended in my mac os.

Please help!! Thanks in advance.

share|improve this question

2 Answers 2

up vote 2 down vote accepted


source filename

should do the trick.

share|improve this answer

Place the following on the first line of the file:


Rename the file extension to .sh. So if the filename is file.txt now it will be called

Don't forget to make it executable:

chmod a+x

And finally, run it with ./:

share|improve this answer
Although this technically is a way to "run this file", you do know that this will do nothing effective, ne? It won't modify the path in the way that the questioner wants. –  JdeBP Dec 18 '13 at 18:46

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.