The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Operating Systems > AIX
.
google unix.com



AIX AIX is IBM's industry-leading UNIX operating system that meets the demands of applications that businesses rely upon in today's marketplace.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
routing kill output from console to file srinivsa UNIX for Dummies Questions & Answers 2 04-05-2009 08:29 AM
Command display output on console and simultaneously save the command and its output satimis UNIX for Dummies Questions & Answers 7 01-25-2009 08:27 PM
redirect to both file and std output at the same time send2sridhar UNIX for Advanced & Expert Users 2 09-23-2008 10:30 PM
Reading console output Blaster999 High Level Programming 1 06-06-2004 10:48 AM
Output to terminal and file at the same time Charlie UNIX for Dummies Questions & Answers 1 11-15-2001 09:19 AM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 06-03-2009
Browser_ice Browser_ice is offline
Registered User
  
 

Join Date: Nov 2005
Location: Canada
Posts: 110
Question All output at console and in a file at same time ?

I have several backup scripts I am improving which involves mksysb, savevg and tar.

Is there a way to have the output of any command sent to the standard output as usual (terminal) and at the same time, send a copy of it all into a file ? Normal outputs and error outputs.

Even if I am checking the status of the backup process, I know my client. They will ask that I display on the terminal the output of the backup so they see it running. But if there is a problem, scrolling the window all the way back to the start of the backup will not be possible (too much output). So if I can send all the output to a file, I could either do a grep from it to spot the error or let the operator view the file to find the errors himself (media error, ...).


added comments...
I saw similar posts done. I am checking them out...


Forgot to mention I am on AIX 4.2 with Korn shell


added comments ...
testing it with TAR

tar cvfpdl /dev/rmt0 . 2>&1 | tee -a /tmp/test.log

it only displays and copies the warnings/errors


tar cvfpdl /dev/rmt0 . | tee -a /tmp/test.log
does the same thing. I need the whole thing on console and in a file.

will continue to check other threads... (by the way, after each backup actions, I am checking the $? status for status and do actions accordingly).

Last edited by Browser_ice; 06-03-2009 at 11:32 PM..
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 06:01 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0