I'm using an existing bash script and want to send the output of 2 rsync commmands so that it is passed to a variable which will then be used later, See below,
rfiles=$(rsync -rvlpogt /svntags/tags/ /var/www/html/) && $(rsync -rvlpogt /svnbranch/branches/ /var/www/html/)
ecode=$?
newfil=$(echo $rfiles | grep -c "Number of files transferred: 0")
However, I only get the output of the 1st rsync sent to my mail. How do include the output of the 2nd rsync command as well along with the first?
Thank you.