Quantcast
Viewing all articles
Browse latest Browse all 16

Answer by analogue for sed in-place flag that works both on Mac (BSD) and Linux

There is no way to have it working.

One way is to use a temporary file like:

TMP_FILE=`mktemp /tmp/config.XXXXXXXXXX`sed -e "s/abc/def/" some/file > $TMP_FILEmv $TMP_FILE some/file

This works on both


Viewing all articles
Browse latest Browse all 16

Trending Articles