This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
Re: KSH to Bash conversion
- To: galenboyer at yahoo dot com
- Subject: Re: KSH to Bash conversion
- From: "Ehud Karni" <ehud at unix dot simonwiesel dot co dot il>
- Date: Mon, 12 Mar 2001 17:38:40 +0200
- CC: cygwin at sourceware dot cygnus dot com
- Organization: Simon & Wiesel Insurance agency
- References: <ur903uobj.fsf@yahoo.com>
- Reply-to: ehud at unix dot simonwiesel dot co dot il
>
> 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@unix.simonwiesel.co.il
--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple