I'd like to alias sed to gsed, but only while a particular script is running.
I have a script that invokes sed. On the Mac, BSD sed doesn't support the required features, but I don't want to replace it globally with the GNU version.
I can't set an alias in the invoker, as aliases aren't propagated, and I can't set it in a login script as then it will apply globally. The script can't be edited.
I'm posting my current solution, using a nasty symlink/path hack, as an answer, but I'm hoping that someone will come up with a better solution.