rc=`tctl -f /dev/rmt? rewind`
If there is a tape in the drive, nothing will get returned to rc.
> I am new to IBM machines. We have IBM RS6000, running AIX 4.3.2.
> I have a script which automatically takes backup of the database at
> night. However I need a mechanism to find whether any tape is present in
> the tape drive. If it isn't, then I can bail out rather than invoking
> the backup program which assumes the tape to be present in the drive.
> This will be very useful when someone forgets to put a tape in the
> Question: Is there a command in AIX which I can call from my shell
> script to find out whether the tape drive has any tape or not?
> Please email me the answer as I don't visit this ng.
> Sent via Deja.com http://www.deja.com/
> Before you buy.