Originally Posted By: artie505
I know chmod doesn't run the file, but how would I execute the cc command when it's still in .txt form? (I tried dragging the file into a Terminal window and hitting "Return, but with no luck.")

Instead of telling us about it, showing us the actual terminal text is much preferred. I have a strange feeling that terminal didn't reply with "no luck". smile

At this point (wherever cc is), a listing with ls -l would be useful (to see if it still has x bits or not).

ls -l
/path/to/cc


Originally Posted By: artie505
In that case, I'd prefer to store cc in ~, but I'm not certain what "modify $PATH accordingly" means. (Does it mean that my cc command must be ~/bin/cc rather than just cc?)

Ideally, we would modify your $PATH variable so you'd only need to type cc

As yet unknown is which of the various startup files your bash shell is already using. This is complicated because there are many possibilities. [e.g., i prefer to set my $PATH in a file called ~/.bashrc]

If you show us this, we can see what your setup is:

cd; ls -1 .bash*


But perhaps (without even knowing which startup files you use), this has the best chance of succeeding:

echo 'declare -x PATH=$PATH:~/bin' >> ~/.bash_profile

...after which, (quit and relaunch terminal) and look at:

echo "$PATH"

and /Users/artie/bin should be at the end there. [don't forget to actually create the ~/bin folder and put cc inside it.]



Last edited by Hal Itosis; 01/14/12 04:39 PM. Reason: oops ; changed > to >> and changed soft quotes to hard quotes