#! /bin/sed -f
/../ {
# Reverse a line. Begin embedding the line between two new-lines
s/^.*$/\
&\
/
# Swap first and last character. The regexp matches until
# there are zero or one characters between the markers
t x
: x
s/\(\n.\)\(.*\)\(.\n\)/\3\2\1/
t x
# Remove the new-line
s/\n//g
}
### colorized by sedsed, a sed script debugger/indenter/tokenizer/HTMLizer
### original script: http://pcsiwa.rett.polimi.it/~paolob/seders/scripts/revchr_2.sed