Re: [SLUG] redirecting tty to a file

From: Glen (gurensan@tampabay.rr.com)
Date: Mon Jan 14 2002 - 19:09:37 EST


Ha! Score 1 for the Glenster :)

        Glen

On Sunday 13 January 2002 23:25, you wrote:
> Thanks for everyone's lightning fast responses. If Roadrunner wasn't
> so lousy this evening, I would've posted this sooner.
>
> I found some redirection information on the print edition on page 239
> of Learning Debian GNU/Linux from Bill McCarty; O'reilly &
> Associates, Inc. (won at a recent SLUG raffle).
>
> Thanks to http://www.opencontent.org/openpub/, you can view it here
> (well worth reading):
> http://www.oreilly.com/catalog/debian/chapter/ch13_02.html#CH13-PGFID-74043
>
> In short, the BASH shell has three "standard data streams": STDIN,
> STDOUT, STDERR. I was getting STDOUT just fine with:
> dpkg -i gcc-whatever.deb > /home/myfile.txt
>
> but I was missing STDERR which was the bulk of what I wanted to capture:
> >, this redirector catches STDOUT like this: i_yap_program >
> >/home/stdout_file.txt
>
> The one I wanted, and the one that worked for me was more comprehensive:
> &>, this redirector catches both STDOUT and STDERR--which is what I
> was missing.
> i_yap_program &> /home/stdout-and-stderr-file.txt
>
> I hope this helps the curious.
>
> Mario
>
> >I'm not sure it'll solve your problem, but have you tried using the "tee"
> >command? I'm not entirely clear on the difference between redirecting with
> >">" vs. using the pipe "|", so I'm not promising it'll be any better. ;)
> >
> >dpkg -i gcc-BLAH-BLAH.deb | tee /home/someuser/install.txt
> >
> >-Ken
> >
> >
> >-----Original Message-----
>
> From: slug@lists.nks.net [mailto:slug@lists.nks.net]On Behalf Of Mario
>
> >Lombardo
> >Sent: Sunday, January 13, 2002 05:10 PM
> >To: slug@nks.net
> >Subject: [SLUG] redirecting tty to a file
> >
> >
> >I thought redirecting tty output to a file could be done with a redirector
> >">"
> >
> >I'm having trouble with this in Debian:
> >
> >dpkg -i gcc-BLAH-BLAH.deb > /home/someuser/install.txt
> >
> >I don't get the entire output in the file. On the screen, I should
> >be seeing prompt after prompt. Instead I'm seeing reporting on the
> >screen, and I'm also not seeing much in the text file (two measly
> >lines). I want to get this stuff verbatim in case it's a bug with
> >Debian Sparc Potato > Woody upgrades.
> >
> >How do I correctly dump everything from this command into a text file
> >instead of the screen? Also, is there a way to have the system
> >automatically log what goes to and from a tty to a text file? This
> >would be for future journalizing purposes (duh, what did I do?).
> >
> >Mario



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 18:54:40 EDT