Monday, December 3, 2007

gnu sed on mac

I found the default sed tool on my MacBook is a bsd version instead of the gnu version, and my Turing machine script can not run with the bsd sed:-(, there are too many differences, so I have to build gnu sed on my Mac.

First download the source code from here, currently I am using the version 4.1.4, and 4.1.5 is broken for "install_sh" dependency.

Build sed with:

./configure --prefix=/opt/markc
make
sudo make install


Then sed is ready to use, but make sure the path /opt/markc/bin is in PATH environment.