SED under Mac OS X 10.5


Blog categories: 

Today I fixed a problem with a bash-script I was using for quite a while now, which refused to work correctly under Mac OS X 10.5 (maybe other versions as well). The Problem was, that an sed script did not substitute, what it ought to.

The core problem simply had to do with extended regular expression under Mac OS X’s sed! With Mac OS X, +, | and ? do not mean the same as they do under e. g. Linux! I was using + and my sed script neglected the work :/

The fix was simply to substitute all occurences of + by \{1,\}, that’s all :D

Cheers, iss