SUMMARY: Solaris 8: Redirect standard error two places

From: Webpro <aielloster_at_gmail.com>
Date: Thu May 11 2006 - 11:55:02 EDT
Thanks to the half a dozen folk who responded immediately.  J. Tucker was
the first who remind me to use 2>&1 | tee logfile.out which I had tried, but
in the midst of the all combinations I things I tried, I dismissed this one
as the log file kept getting overwritten.   As the masses can now see, it
was right all along, I just forgot to add the -a to tee to append to the log
file.  I guess I could not see the forest through all the trees!

I will be testing 2>&1 | tee -a logfile.out in my script and give it a good
grinding test.

Thanks!


On 5/11/06, Webpro <aielloster@gmail.com> wrote:
>
> I have been struggling to redirect standard error and standard out how I
> want them to be directed.  I have been through the Sun documentation and
> many, many web sites with no luck.
>
> I have a script that we use to install and configure some applications.
> What I am trying to accomplish is redirecting standard error to a log file
> and to the terminal/console.
>
> - I am using KSH
> - Standard out is redirected to a log file and all standard out from
> system commands and scripts I am calling are redirected to this log file.
> The operator only sees the standard out I let them see
> - Standard error should be redirected to the same log file plus I want it
> on the console/terminal too. I want operators to see the error and have it
> in the log
> - I currently redirect standard out to log.file and standard error to
> log.file.trap since I could not get the redirect to work.
>
> Is this doable?
> --
> "Despite the high cost of living, it still remains popular!"
>



--
"Despite the high cost of living, it still remains popular!"
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
Received on Thu May 11 11:55:31 2006

This archive was generated by hypermail 2.1.8 : Thu Mar 03 2016 - 06:43:58 EST