12 May
2008
12 May
'08
12:13 p.m.
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" :-) -- Mark Rogers // More Solutions Ltd (Peterborough Office) // 0845 45 89 555 Registered in England (0456 0902) at 13 Clarke Rd, Milton Keynes, MK1 1LG