This script not needed.

Better to use a sed one-liner or similar.