I have got this running fine in the terminal
rsync --info=progress2,stats source destion | stdbuf -oL awk 'BEGIN { RS="" } /%/ { print $2 }' > /temp/progress.txt
but when I try and move it over to PHP exec i run into errors
echo exec('rsync --info=progress2,stats source destion | stdbuf -oL awk 'BEGIN { RS="" } /%/ { print $2 }' > /temp/progress.txt');
I receive this error
mod_fcgid: stderr: PHP Parse error: syntax error, unexpected 'BEGIN' (T_STRING), expecting ',' or ')' in /home/laweb/public_html/phptest/copy.php on line 32
I have tried changing ' to " inside the exec(' ') command then I don't receive any output to the error log