"sed -i" workaround for Solaris

Unlike it's Linux counterparts, the version of sed running on Solaris is not capable of actually saving the file. So a simple command to find and replace a string like sed -i 's/from/to/g' filename is impossible under Solaris.

All is not lost as we have a workaround using perl to achieve the same results.

Linux example using sed:

% sed -i 's/pinky/perky/g' puppets.txt

Solaris example using perl:

% perl -pi -e 's/pinky/perky/g' puppets.txt