Subject: Problems with shell script (bash)
From: [email-masked] (Yung Hsien)

31 Aug 1997 16:04:03 -0700
Approved: [email-masked]
Distribution: cygnus
Message-ID: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
X-Sender: [email-masked]
X-Mailer: Windows Eudora Version 2.0.3
Original-To: [email-masked]
Original-Sender: [email-masked]

Hello,

I'm having a problem with bash, tr, or echo... I'm not sure who the culprit
is here. In any case, here's a short script:

>#!/bin/sh
>
>OPTIONS="A B C"
>
>FOUND="FALSE"
>FIND=`echo a | tr '[a-z]' '[A-Z]'`
>
>echo $FIND
>
>for opt in $OPTIONS ; do
>  if [ $opt = $FIND ] ; then
>    FOUND="TRUE"
>  fi
>done
>
>echo $FOUND
>

What it should echo at the end is TRUE since 'A' is in "A B C".
But it echos FALSE. Note, that this works on my UNIX box. Also, if I say
FIND=`echo A | tr '[a-z'] '[A-Z]'` that fails also.

Thanks,
Yung Hsien
[email-masked]

-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".