HP9000-L Archives

August 2002

HP9000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
"Newton, Tony" <[log in to unmask]>
Reply To:
Newton, Tony
Date:
Wed, 28 Aug 2002 15:43:40 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (132 lines)
Does anybody see why this always equates to FALSE?  I have tried this
equation many different ways and I can't seem to find the correct syntax.  I
am using the single quotes to protect the brackets on the right hand side.
The only thing I can guess is that the variable on the left is getting
resolved first; then when it scans the line again it is seeing the brackets
on the left hand side.  If this is correct then how does one solve that
problem?

:/tmp> echo $tapestat
Status: [0]

:/tmp> if [ $tapestat = 'Status: [0]' ]
> then echo true
> else echo false
> fi
false
:/tmp>




___
Tony Newton



-----Original Message-----
From: Neil Armstrong [mailto:[log in to unmask]]
Sent: Wednesday, August 28, 2002 8:39 AM
To: [log in to unmask]
Subject: Re: [HP9000-L] DB2 v7 and HPUX v10.2


At 08:12 AM 8/28/2002 -0700, Newton, Tony wrote:
>Does anyone know if there exists a free tape handling utility for Unix?  I
>want to be able to query the tape drive to determine if a tape has been
>loaded, establish whether a tape is write protected and eject a tape from
>the drive.
>___

Tony,

Below is a kshell function that detects whether a tape is mounted or not.
  I forget how to eject a tape on HP-UX or
even if it is possible:

detect_dat_tape()
{
    x=0
    while [ $x != 1 ]
    do
       mt -t /dev/rmt/0m rew
       if [ $? -ne 0 ]
       then
          echo "I did not find a tape. Please insert a tape"
          sleep 10
       else
          echo "A tape has been found. Thanks. "
          x=1
       fi
    done

}

Hope this helps.

Neil Armstrong

>Tony Newton
>
>-----Original Message-----
>From: Landin, Mark [mailto:[log in to unmask]]
>Sent: Wednesday, August 21, 2002 2:44 PM
>To: [log in to unmask]
>Subject: Re: [HP9000-L] DB2 v7 and HPUX v10.2
>
>
>I don't believe there's a command line for it. The C function time()
>returns this value, however, and the Perl function time() returns it
>also. It's up to you which is easier to access...
>
>-----Original Message-----
>From: Newton, Tony [mailto:[log in to unmask]]
>Sent: Wednesday, August 21, 2002 4:38 PM
>To: [log in to unmask]
>Subject: Re: [HP9000-L] DB2 v7 and HPUX v10.2
>
>
>Can anybody recall a Unix command for returning the number of seconds or
>days or something similar since the "Birth of Unix" (1 Jan 1970)?
>
>I've been trying to get what I'm wanting from the date command but I'm
>just
>not finding what I'm looking for.
>___
>Tony Newton
>
>
>
>This message is intended for the sole use of the individual and entity
>to
>whom it is addressed, and may contain information that is privileged,
>confidential and exempt from disclosure under applicable law.  If you
>are
>not the intended addressee, nor authorized to receive for the intended
>addressee, you are hereby notified that you may not use, copy, disclose
>or
>distribute to anyone the message or any information contained in the
>message.  If you have received this message in error, please immediately
>advise the sender by reply email and delete the message.  Thank you very
>much.
>
>This message is intended for the sole use of the individual and entity to
>whom it is addressed, and may contain information that is privileged,
>confidential and exempt from disclosure under applicable law.  If you are
>not the intended addressee, nor authorized to receive for the intended
>addressee, you are hereby notified that you may not use, copy, disclose or
>distribute to anyone the message or any information contained in the
>message.  If you have received this message in error, please immediately
>advise the sender by reply email and delete the message.  Thank you very
>much.

This message is intended for the sole use of the individual and entity to
whom it is addressed, and may contain information that is privileged,
confidential and exempt from disclosure under applicable law.  If you are
not the intended addressee, nor authorized to receive for the intended
addressee, you are hereby notified that you may not use, copy, disclose or
distribute to anyone the message or any information contained in the
message.  If you have received this message in error, please immediately
advise the sender by reply email and delete the message.  Thank you very
much.

ATOM RSS1 RSS2