Wrote sed script which repairs multi-line bash history