Re: Basic bash question.
On Wed, Mar 5, 2008 at 6:16 AM, Andrew Sackville-West
<andrew@farwestbilliards.com> wrote:
> On Mon, Mar 03, 2008 at 08:08:47PM -0800, joseph lockhart wrote:
> >
> > Luis Maceira <luis_a_maceira@yahoo.com> wrote: How can I see all the messages generated by
> > a bash command (configure make make install,
> > for example) to standard output(computer screen),
> > and at the same time make sure that all is
> > written to a text file for later analysis.
> > It is a redirection but I don´t know how to make
> > both things happen at the same time.
> > Is that possible?With all the bash commands?
> >
> > Without GUI(X),all command line environment.
> >
> > I would try
> >
> > some command && some command > some file
>
> I believe that will only put the second command into the file, the
> first will still go to the screen. And that only puts stdin in the
> file, you'd likely want to redirect stderr as well.
Just to offer suggestion on this one, you can put brackets:
(command1 && command2) > filename
To redirect stderr as well
(command1 && command2) > filename 2>&1
Chris
Reply to: