ecgo '123' |sed -r 's@(.\)(.\)(.\)@\3\2\1@g'
echo '123 456 789' |sed -r '/\n/!G;s@(.)(.*\n)@&\2\1@;//D;s@.@@'
echo '123 456 789' |python -c 'print raw_input()[::-1]'
echo '123 456 789' |awk '{for(i=1;i<=length;i++) {line=substr($0,i,1) line}} END{print line}'
转载于:https://www.cnblogs.com/hygs/p/6830222.html