Using tee
2007-12-24 19:33:00
about getting the output to a file and the screen at the same time. Most
everyone suggested I use "tee". I looked into it and it does provide what I
am looking for - somewhat.
What I would like to do with this is run it as part of the script rather
than a pipe of the command line. Most people suggested this syntax:
# scriptname | tee filename 2>&1
However, I am trying to incorporate this into the script I have. Rather
than run this command manually I would prefer the users just type in the
scriptname and the ufsdump takes place while logging to the file.
My script syntax is:
MSGFILE=/export/home/foo
ufsdump 0cf /dev/rmt/0cn $1 | tee $MSGFILE 2>&1
($1 is the name entered as the FS to backup by user)
This line puts the standard output to the screen and not to the file asI was
hoping. Am I doing something wrong? Thanks again.
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com
Comments
Got something to say?
You must be logged in to post a comment.

