GNU sed and xpath on OS X

In my team, there is 20% of OS X machines, rest are linuxes. We share one script, that everyone on our team uses.

That script was written by some guy on Ubuntu and guess what? GNU versions of those programs (sed and xpath) are not compatible with BSD versions. The script was failing :(

I was trying to improve the script, but forget about it. Just use GNU programs.

To install gnu sed on osx via homebrew type the following:

GNU Sed
1
brew install gnu-sed --with-default-names

To install gnu xpath on osx via homebrew type the following:

GNU Xpath
1
2
3
4
brew tap concept-not-found/tap  
brew install xpath
mv /usr/local/bin/xpath /usr/local/bin/osx.xpath
sudo ln -s /usr/local/Cellar/xpath/1.13-7/bin/xpath /usr/local/bin/xpath

Comments