Joris <[EMAIL PROTECTED]> wrote: > On Tue, 2006-06-20 at 15:19 -0700, Bill Wohler wrote: > <snip> > > sudo sh -c "readlink /etc/X11/X | md5sum > /var/lib/x11/X.md5sum" > <snip> > > (totally off topic, but a thought maybe worth sharing:) > > I used to pull similar tricks to redirect output to a file writable only > by root. it can be done without spawning a root shell, though: > > readlink /etc/X11/X | md5sum | sudo tee /var/lib/x11/X.md5sum > > it has the added bonus of showing what you've just written to the file > (unless you tack '>/dev/null' to the end of the line, of course). see > tee(1) for more info (the append option is handy for replacing '>>')
Another for the "Now, why didn't I think of that?" category. Nice. Thanks. -- Bill Wohler <[EMAIL PROTECTED]> http://www.newt.com/wohler/ GnuPG ID:610BD9AD -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]