remove GNU-specific usage for `sed` in shell example

This ensures that the shell example works with GNU and non-GNU `sed`.