BASh help -- SOVLED

Jacques B. jjrboucher at gmail.com
Thu Aug 30 17:16:18 UTC 2007


On 8/30/07, Mark Haney <mhaney at ercbroadband.org> wrote:
> bruce wrote:
> > hey mark..
> >
> > can you list your entire script...
> >
> >
> > -----Original Message-----
> > From: fedora-list-bounces at redhat.com
> > [mailto:fedora-list-bounces at redhat.com]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.




More information about the users mailing list