tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
* inequalities in a case statement in ksh
@ 1998-03-31 20:39 Spalding, Steve
  0 siblings, 0 replies; only message in thread
From: Spalding, Steve @ 1998-03-31 20:39 UTC (permalink / raw)
  To: tru64-unix-managers

Hello all!

Since my question earlier today went so well, I thought that I would try
another. I'm writing a script file using a case statement, and I want to
use inequalities with it but don't know how. Here is what I have right
now: 
   case "$capacity" in
           [93 - 96]    if [ $severity -lt 1 ];then
                                severity=1
                                fi      #if [ $severity -lt 1 ];then
                                ;;
            [97 - 99]       if [ $severity -lt 2 ];then
                                severity=2
                                page=true
                                fi      #if [ $severity -lt 2 ];then
                                ;;
              100)            if [ $severity -lt 3 ];then
                                severity=3
                                page=true
                                fi      #if [ $severity -lt 3 ];then
                                ;;
    esac    #case "$capacity" in

Let's say that in the last case I wanted to catch any value above 100
instead of just 100; how would I set that up? Here is what I have tried
using:

          > 100	if [ $severity -lt 3 ];then

        [ > 100 ]    if [ $severity -lt 3 ];then

       [ -gt 100]    if [ $severity -lt 3 ];then

but nothing seems to want to work. Any ideas?

Thanks!

PS - Lawrence Decker - I tried responding to your email earlier, but I
keep getting this text in a returned mail message:

Your Message
    To:		'ldecker@pbchcd.state.fl.us'
    Subject:	FW: Pop up message
Was not delivered for the following reasons:
    Delivery failed to SMTP:ldecker@pbchcd.state.fl.us.
    Reason: 0 (transfer failed)
    diagnostic:  0 (OR name (Email address) unrecognized).
    MSEXCH:IMS:MEM:EXCH1:MEM_CO_NT1 3902 (000B0981) Host Unknown.


Stephen Spalding
Associate System Administrator 
sspaldin@mem-ins.com
Missouri Employers Mutual Insurance

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1998-03-31 20:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1998-03-31 20:39 inequalities in a case statement in ksh Spalding, Steve

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox