$ 0 0 You may use Perl on the commandline:perl -e 'my @b=(); while(<>) {push(@b, $_);}; print join("", reverse(@b));' orig > rev