[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: redirecting the output with sudo



On Wed, 16 Nov 2005 22:29:43 -0500, kamaraju kusumanchi <raju.mailinglists@gmail.com> said:

> Is there a way to do this in one single command?
> $wajig doc > /tmp/wajig_doc.txt
> $sudo mv /tmp/wajig_doc.txt /root/wajig_doc.txt

I usually do "sudo wajig doc | sudo tee /tmp/wajig_doc.txt".  I guess
you could also do "sudo wajig doc | sudo tee /tmp/wajig_doc.txt >
/dev/null" so that the output doesn't get copied to the terminal.

-- 
Hubert Chan <hubert@uhoreg.ca> - http://www.uhoreg.ca/
PGP/GnuPG key: 1024D/124B61FA
Fingerprint: 96C5 012F 5F74 A5F7 1FF7  5291 AF29 C719 124B 61FA
Key available at wwwkeys.pgp.net.   Encrypted e-mail preferred.



Reply to: