This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: KSH to Bash conversion

> 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 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

Want to unsubscribe from this list?
Check out:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]