sudo コマンドが >>/path/a.txt を持って行ってしまうのが問題(だと思う)
sudo sh -c 'echo "abc" >> /path/a.txt'