I'd like to see more entries in this section also... maybe a weekly script challenge or something.
#!/usr/bin/sed -f
# reverse all chars of each line, keep line ordering
# ignore empty lines, i.e. nothing to reverse
/./!b
# escape ! by doubling it, place markers at beginning and end of line
# the markers are -!- which can never happen after the escaping of !
s/!/!!/g
s/^/-!-/
s/$/-!-/
# swaps first char after first maker, with first char before last marker
# and then advance the markers through the swapped chars
ta
:a
s/-!-\([^!]\|!!\)\(.*\)\([^!]\|!!\)-!-/\3-!-\2-!-\1/
ta
# delete markers, and then unescape the !s
s/-!-//g
s/!!/!/g
ir@grendel [~/code/sed]# echo "hi there" | ./s.sh
ereht ih