mt status option

kcables at RELAY.NSWC.NAVY.MIL kcables at RELAY.NSWC.NAVY.MIL
Wed Dec 12 06:52:27 AEST 1990


Hi everyone,
	I'm trying to write a shell script in which I need to find
out if the 8mm tape is in the drive.  Whenever I execute the
mt command with the status option, the output always appears at
my terminal, regardless of whether its output is redirected or piped,
or even if it's in a shell script on the right side of an equal sign.
Does anyone know how this output can be redirected so that I can
capture the 'status' information?  I tried

	mt -t /dev/mt/tps0d6 status > dum

	mt -t /dev/mt/tps0d6 status | grep Status

	and in a shell script:

	xxx=`mt -t /dev/mt/tps0d6 status`

All of the above display the output at my terminal.  Thanks
in advance.

kcables at relay.nswc.navy.mil



More information about the Comp.sys.sgi mailing list