I\'m looking for a way to turn this:
hello < world
to this:
I could use sed, but
Try recode (archived page; GitHub mirror; Debian page):
$ echo '<' |recode html..ascii <
Install on Linux and similar Unix-y systems:
$ sudo apt-get install recode
Install on Mac OS using:
$ brew install recode