02-01-2007
case insenserive comparision
in If statement how can i campare
"ASCII" with "ascii"
the result of comparision shold be true.....
9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
How can convert a Lower case variable value to an upper case in the kron shell script. (3 Replies)
Discussion started by: dchalavadi
3 Replies
2. Shell Programming and Scripting
HELLO ALL,
URGENTLY NEEDED A SCRIPT TO SELECT AND DELETE LOWER AND MIXED CASE RECORDS FROM A COLUMN IN A TABLE.
FOR EXAMPLE : Table name is EMPLOYEE and the column name is CITY
and the CITY column records will be: Newyork
washington
... (1 Reply)
Discussion started by: abhilash mn
1 Replies
3. Shell Programming and Scripting
Hi All
I have a script which extracts values from a Database (A persons name) and puts it into a variable in my script IE: $NAME
However the Value in the DB is all in uppercase and contains the users first name and last name
EG:
> echo $NAME
GRAHAM BOYLE
>
What I need is only the... (7 Replies)
Discussion started by: grahambo2005
7 Replies
4. Shell Programming and Scripting
Hi all,
i have a data array as followes.
ARRAY=DFSG345GGG
ARRAY=234FDFG090
ARRAY=VDFVGBGHH
so on..........
i need all english letters to be change to lower case. So i am expecting to see
ARRAY=dfsg345ggg
ARRAY=234fdfg090
ARRAY=vdfvgbghh
so on........
If i have to copy this data in... (8 Replies)
Discussion started by: usustarr
8 Replies
5. Shell Programming and Scripting
Hi
I want to make string substitution ignoring case for search but respecting case for subtitute. Ex changing all occurences of "original" in a file to "substitute":
original becomes substitute
Origninal becomes Substitute
ORIGINAL becomes SUBSTITUTE
I know this a little special but it's not... (1 Reply)
Discussion started by: kmchen
1 Replies
6. Shell Programming and Scripting
Is there a command that can switch a character variable from UPPER case to lower case?
like
foreach AC ( ABC BCD PLL QIO)
set ac `COMMAND($AC)`
...
end
Thanks a lot! (3 Replies)
Discussion started by: rockytodd
3 Replies
7. Shell Programming and Scripting
Hello Unix Gurus :
It would be really appreciative if can find a solution for this .
I have records in a file .
I need to Capitalize the records based on condition .
For Example i tried the following Command
COMMAND -->
fgrep "2000YUYU" /export/home/oracle/TST/data.dat | tr '' ''... (12 Replies)
Discussion started by: tsbiju
12 Replies
8. Shell Programming and Scripting
Hi all,
I am trying to find a way to change first letter in a word from lower case to upper case. It should be done for each first word in text or in paragraph, and also for each word after punctuation like
. ; : ! ?I found the following command
sed -i 's/\s*./\U&\E/g' $@ filenamebut... (7 Replies)
Discussion started by: georgi58
7 Replies
9. Shell Programming and Scripting
Hi,
I want to do caseless string comparision using test command
for eg: Ind_f="y"
test "$Ind_f" == "y|Y"
i tried , ** , nothing worked.
any thoughts on how to do case insensitive string comparison using test command without converting to any particular case using typeset or tr? (8 Replies)
Discussion started by: Kulasekar
8 Replies
CTYPE(3) Library Functions Manual CTYPE(3)
NAME
isalpha, isupper, islower, isdigit, isxdigit, isalnum, isspace, ispunct, isprint, isgraph, iscntrl, isascii, toupper, tolower, toascii -
character classification macros
SYNOPSIS
#include <ctype.h>
isalpha(c)
. . .
DESCRIPTION
These macros classify ASCII-coded integer values by table lookup. Each is a predicate returning nonzero for true, zero for false. Isascii
and toascii are defined on all integer values; the rest are defined only where isascii is true and on the single non-ASCII value EOF (see
stdio(3S)).
isalpha c is a letter
isupper c is an upper case letter
islower c is a lower case letter
isdigit c is a digit
isxdigit c is a hex digit
isalnum c is an alphanumeric character
isspace c is a space, tab, carriage return, newline, vertical tab, or formfeed
ispunct c is a punctuation character (neither control nor alphanumeric)
isprint c is a printing character, code 040(8) (space) through 0176 (tilde)
isgraph c is a printing character, similar to isprint except false for space.
iscntrl c is a delete character(0177) or ordinary control character (less than 040).
isascii c is an ASCII character, code less than 0200
tolower c is converted to lower case. Return value is undefined if not isupper(c).
toupper c is converted to upper case. Return value is undefined if not islower(c).
toascii c is converted to be a valid ascii character.
SEE ALSO
ascii(7)
7th Edition May 12, 1986 CTYPE(3)