delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/03/12/11:25:37

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Date: Mon, 12 Mar 2001 17:38:40 +0200
Message-Id: <200103121538.RAA20010@linux.>
From: "Ehud Karni" <ehud AT unix DOT simonwiesel DOT co DOT il>
To: galenboyer AT yahoo DOT com
Subject: Re: KSH to Bash conversion
CC: cygwin AT sourceware DOT cygnus DOT com
In-reply-to: <ur903uobj.fsf@yahoo.com> (message from Galen Boyer on 12 Mar
2001 08:08:48 -0500)
Organization: Simon & Wiesel Insurance agency
Reply-to: ehud AT unix DOT simonwiesel DOT co DOT il
References: <ur903uobj DOT fsf AT yahoo DOT com>
X-Mailer: Emacs 20.7.1 rmail (send-msg 1.104)
MIME-Version: 1.0

> 
> In KSH, I have the following statement:
> 
> typeset -u TableName=$2

THIS IS DEFINITELY OFF TOPIC. Please don't ask more bash questions here.

Anyway since you have done your noise, here are some answers.

1. To convert to upper case you can use `tr' like this:
       TableName=`echo "$2" | tr "[a-z]" "[A-Z]"`
   Please note all the " and ` - they are essential.

2. Echo of escaped (backslashed) characters.
   Beside the -e argument you can:
   2.1  Use /bin/echo
   2.2  Set the xpg_echo option (shopt -s xpg_echo)
   2.3  Compile bash with --enable-usg-echo-default

Remember in Cygwin sh is not bash (it is ash). You can change this by
removing/renaming sh and sym-linking bash to sh (that's what I do).

I STRONGLY suggest you read the bash man page(s) carefully.

Ehud.


-- 
 @@@@@@ @@@ @@@@@@ @    @   Ehud Karni  Simon & Wiesel  Insurance agency
     @    @      @  @@  @   Tel: +972-3-6212-757    Fax: +972-3-6292-544
     @    @ @    @ @  @@    (USA)  Fax  and  voice  mail:  1-815-5509341
     @    @ @    @ @    @        Better     Safe     Than     Sorry
 http://www.simonwiesel.co.il    mailto:ehud AT unix DOT simonwiesel DOT co DOT il

--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019