Link to home
Start Free TrialLog in
Avatar of dhite99
dhite99

asked on

typeset -l var2=$var1

I have a korn shell script that has been working fine -- until someone tried to use it on a server and got the following error on a typeset -l command:

Enter environment (cert or prod) [cert]:
rman.dbsetup.ksh: line 453: typeset: -l: invalid option
typeset: usage: typeset [-afFirtx] [-p] name[=value] ...

...which seems to say that "typeset -l" (for translating to lower case) does not work on some linux korn shell implementations. Does anyone (a) know why this is happening and (b) have a translation to lower case that works on all implementations of KORN shell/linux (I have man y other places that use "typeset -l" that are not included in the code supplied here, so the need is for a general utility to translate to lower case).

Thanks!
msg "\n\n\nEnter environment (cert or prod) [${default}]:"
 read copr
 typeset -l cop=$copr
 
 if [ ! "$cop" ]
 then
       cop=$default
       loop=""
       break
 fi

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of woolmilkporc
woolmilkporc
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial