Viewing and Storing output of Unix command concurrently

2007-12-25 10:13:00

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

Comments

Got something to say?

You must be logged in to post a comment.