Re: BASh help -- SOVLED

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

 



On 8/30/07, Mark Haney <mhaney@xxxxxxxxxxxxxxxx> wrote:
> bruce wrote:
> > hey mark..
> >
> > can you list your entire script...
> >
> >
> > -----Original Message-----
> > From: fedora-list-bounces@xxxxxxxxxx
> > [mailto:fedora-list-bounces@xxxxxxxxxx]On Behalf Of Mark Haney
> > Sent: Thursday, August 30, 2007 8:13 AM
> > To: For users of Fedora
> > Subject: BASh help
> >
> >
>
> I can, but then I realized the problem, I wasn't redirecting stderr,
> only stdout to the file.  The ls output is an error message.  Duh.
>
I've had scripts where I re-direct stdout to one file, and stderr to a
different file.

so your script would have
ls {filename} >output.txt 2>errors.txt

And of course double-redirect (>>) for both of them if you are running
a loop that must append to an existing file.

Jacques B.


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux