1

BSD and GNU sed have some small differences in what arguments they accept. I just learned that I have to use different command lines when using -i:

sed -i '' # BSD
sed -i    # GNU

I solved this with an IMO ugly hack involving storing the correct parameter in an environment variable.

Is there a nicer way to do that?

muru
  • 72,889
daniel kullmann
  • 9,527
  • 11
  • 39
  • 46

0 Answers0