does not work
echo ${REV%%\\n*}
does work
echo ${REV%% *}
After reading trough http://tldp.org/LDP/abs/html/p
${REV%%$'\n*'} seems to work. See the quoting section of the bash documentation.
${REV%%$'\n*'}