Srdjan Todorovic wrote:
To append, I usually use cat "foobar" >> /file/to/append/to No use of tee :
Sadly that won't work if /file/to/append/to requires root permissions to write to it (and assuming you're not logged in as root).
sudo cat "foobar" >> /file/to/append/to .. would execute the cat command as root (unnecessary) and drop back to normal user privileges to write the output to the file (which won't work).
That said, it's as easy to > instead of >> as it is to "tee" instead of "tee -a" :-)