Source code of "/opt/local/bin/getopt"

Jeremy Lavergne jeremy at
Fri Mar 15 06:39:12 PDT 2013

> I'm interested in see the source code for "/opt/local/bin/getopt".
> Could anybody show me how to locate the source code of an executable
> in macports? Thanks!

First check which port it comes from:
`port provides /opt/local/bin/getopt`

Then you can extract the source of the port and cd to the source:
`sudo port extract $PKG && port work $PKG`

More information about the macports-users mailing list