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

Re: redirecting the output with sudo



Hubert Chan wrote:

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.
Thanks for all the replies. Both Hubert's and Almut's suggestions work fine for me. I have not used script before, but may be I will try to learn it in the future if the need arises.

raju

--
Kamaraju S Kusumanchi
http://www.people.cornell.edu/pages/kk288/
http://malayamaarutham.blogspot.com/



Reply to: