Not exactly sure what you want your end result to be - but this for instance should find uppercase letters - if they are there, convert them to lowercase.
Basically, doing the grep for [A-Z] returns the argument provided if it has capital letters. If this happens, the return code ($?) is 0. If the return code is a 1, no capital letters were in the argument.
You can then run through all arguments.
You can apply this anyway you want though. Grep for [a-z] or [A-Z]. If the return code is 0, then the caps or lowercase were found and you can act accordingly.
i would like to know wheather is there a way thats i can check multiple arguments at the same time? bcos i got 3 args to input then i would like to check this 3 args for uppercase.
You could, for instance, rewrite the test_upper function to return a 1 or a 0, depending on whether or not it found uppercase. (You could simple use "echo $?" to "return" this value). Then, when you loop the arguments, you can have a variable that holds whether or not the case you are testing for was found (globally). e.g.
No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.