SUMMARY: Viewing and Storing output of Unix command concurrently

From: S. Varshney (varshney@pacbell.net)
Date: Mon Apr 28 1997 - 18:38:24 CDT


My original question was regarding being able to view and store (into a log
file) the results of the command:

mt -f /dev/rmt/0 status

Answer:
==========================
For Bourne Shell -

mt -f /dev/rmt/0 status 2>&1 | tee -a filename

The tee "copies standard input to standard output," from 'man tee'

In Bourne Shell "2>&1" captures stderr output by redirecting it to stdout.
==========================

Thanks to everyone who replied I got about 30 correct answers.

Suvrit
mailto:varshney@pacbell.net



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:11:51 CDT