Some nice `sed` solutions: Encode: https://stackoverflow.com/a/12873723/387851 Decode: https://stackoverflow.com/a/43058947/387851