Some ways to remotely run a local script.
Archive of posts tagged shell
“In-place” editing of files
Temporary files don't bite, so just use them.
Removing newlines in text files
A task that comes up every so often, for some reason