#! /bin/sed -f

# Reverse a line; add a new-line to the end
s/$/\
/

# Move first character at the end.  The regexp matches
# until the first character has become the new-line
t x
:x
s/\(.\)\(.*\n\)\(.*\)/\2\1\3/
t x

# Remove the new-line
s/^.//

### colorized by sedsed, a debugger and code formatter for sed scripts
### original script: http://sed.sf.net/grabbag/scripts/revchr_1.sed