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 strongm 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 2 files

Status
Not open for further replies.

apache7

Programmer
Aug 28, 2002
4
US
Gurus,

I am trying to optimize a few ksh scripts in AIX and was wondering if there is a way to redirect std output to 2 files simultaneously with a single command?

Something like:
/bin/echo "Hello!" >> file1 file2

Can I use the 'tee' command for this?
Thank-you in advance for helping out a true newbie to scripting.

apache7
 
NAME
tee - replicate the standard output

SYNOPSIS
tee [ -ai ] [ file ... ]

DESCRIPTION
The tee utility will copy standard input to standard out-
put, making a copy in zero or more files. tee will not
buffer its output. The options determine if the specified
files are overwritten or appended to.


vlad
+----------------------------+
| #include<disclaimer.h> |
+----------------------------+
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top