Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

redirect output to screen and file at the same time

Status
Not open for further replies.

keak

Programmer
Sep 12, 2005
247
CA
Hi there,
In shell scipt, if we wanted to redirect an output of a script to a file, we can do the following and no output will appear on the screen.
Code:
perl test.pl >> outfile 2>&1

Is there a way to have this script output both to the outfile and also to the screen?

Any help is appriciated :)
thanks,

 
See tee command

-------------------------
The trouble with doing something right the first time is that nobody appreciates how difficult it was - Steven Wright
 
cool !!!
that did the trick. Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top