Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
* Bourne shell redirection
@ 1996-11-22  5:00 saimcplus
  1996-11-23  5:00 ` Tim Mooney
  0 siblings, 1 reply; 2+ messages in thread
From: saimcplus @ 1996-11-22  5:00 UTC (permalink / raw)



Does anyone know of a way to redirect standard out and standard error both
to the
screen and to a file from a bourne shell script?  I have a backup script
doing a dump and I would like to be able to see what it is doing on the
screen as well as
capture the results in a file in case of an error.

Thanks in advance, 

Melissa   
saimcplus@aol.com



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Bourne shell redirection
  1996-11-22  5:00 Bourne shell redirection saimcplus
@ 1996-11-23  5:00 ` Tim Mooney
  0 siblings, 0 replies; 2+ messages in thread
From: Tim Mooney @ 1996-11-23  5:00 UTC (permalink / raw)



[posted & cc'ed]

In article <19961122203200.PAA06969@ladder01.news.aol.com>,
 <saimcplus@aol.com> wrote:
> Does anyone know of a way to redirect standard out and standard error both
> to the
> screen and to a file from a bourne shell script?

Redirect stderr onto stdout and then pipe both into `tee':

	cat /etc/passwd /etc/somefilethatdoesntexist 2>&1 | tee screen-output.log

Tim
-- 
Tim Mooney                              mooney@dogbert.cc.ndsu.NoDak.edu
Information Technology Services         (701) 231-1076 (Voice)
Room 242-J1, IACC Building              (701) 231-8541 (Fax)
North Dakota State University, Fargo, ND 58105-5164



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1996-11-23  5:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1996-11-22  5:00 Bourne shell redirection saimcplus
1996-11-23  5:00 ` Tim Mooney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox