This is the mail archive of the
cygwin@sourceware.cygnus.com
mailing list for the Cygwin project.
Re: Problems with shell script (bash)
- To: yung at pobox dot com (Yung Hsien), gnu-win32 at cygnus dot com
- Subject: Re: Problems with shell script (bash)
- From: jeffdbREMOVETHIS at netzone dot com (Mikey)
- Date: Mon, 01 Sep 1997 01:24:31 GMT
- Organization: Never
- References: <199708281923.MAA17886@rx7.connectinc.com>
- Reply-To: jeffdbREMOVETHIS at netzone dot com
To see what's going on in a bash script do
set -xv
./scriptname
set +xv
On Thu, 28 Aug 1997 12:23:50 -0700, you wrote:
>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
>yung@connectinc.com
>
>-
>For help on using this list (especially unsubscribing), send a message to
>"gnu-win32-request@cygnus.com" with one line of text: "help".
>
(jeffdbREMOVETHIS@netzone.com)
delete REMOVETHIS from the above to reply
Mikey
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".