#! /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 sed script debugger/indenter/tokenizer/HTMLizer ### original script: http://pcsiwa.rett.polimi.it/~paolob/seders/scripts/revchr_1.sed