If you don't like the backslash-newline-pipe sequence, if you put the pipe at the end of the previous line, you don't need the backslash; but it's less obvious that the next line is operating on the output of the previous.
Multi-line arguments to sed can be a pain (good luck getting your editor to auto-indent them). Instead, you can use -e to specify multiple sed commands.
There's nothing in there that would make it not work in bash. That should work in any Bourne-family shell.
It only handles 0 or 1 arguments correctly, not > 1.