sed 's/$'"/`echo \\\r`/" # Command line under bash. sed "s/$/`echo -e \\\r`/" # Command line under ksh. sed "s/$/`echo \\\r`/" # Command line under zsh. sed 's/$/\r/' # gsed 3.02.80.
sed "s/$//" # Method 1. sed -n p # Method 2.