Where do you find the Bash source files of programs in Linux/Mac OSX?

Posted by AndrewKS on Super User See other posts from Super User or by AndrewKS
Published on 2011-01-06T19:01:01Z Indexed on 2011/01/06 19:56 UTC
Read the original article Hit count: 244

Filed under:
|
|
|
|

I am currently writing some convenience methods for my terminal in my bash_profile and am sure if what I am writing is "the best way". I figure a good way to verify whether what I'm doing is right or not would be to find some source code of more established programs and see how they do it.

My question then is, where can I find this code on my Mac? An example is, with Macports installed, where is the source code that opens the port interactive console when I type nothing but "port" in my shell?

(I added Linux in the title even though I am on a Mac because I assume the answer would be the same for both)

Edit: The answer I am looking for is in terms of which directory relative to the programs will I find their unix scripts.

© Super User or respective owner

Related posts about linux

Related posts about mac