troubleshooting Question

typeset -l var2=$var1

Avatar of dhite99
dhite99 asked on
Shell Scripting
1 Comment1 Solution1187 ViewsLast Modified:
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).

msg "\n\n\nEnter environment (cert or prod) [${default}]:"
 read copr
 typeset -l cop=$copr
 if [ ! "$cop" ]
Join our community to see this answer!
Unlock 1 Answer and 1 Comment.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 1 Comment.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros