RHEL5 braceexpand in KSH not working the same as RHEL4 HELP!
ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
RHEL5 braceexpand in KSH not working the same as RHEL4 HELP!
On my RHEL4 system i was able to write a KSH script and set enviornment varibales by doing the following:
set +o braceexpand (turns off braces)
CLUSTER_NODES='{"usplselux140","usplselux141"}'
echo $CLUSTER_NODES
{"usplselux140","usplselux141"}
variable is set as wanted and looks like above echo output! I require the enviroment variable to be exactly like the output.
Now i have moved on to Linux 5 and doing the same thing i get the wrong output with braceexpand turned off as in RHEL4.
set +B braceexpand
set -o
Current option settings
braceexpand off
set +o seems to the do the same and turns off braceexpand
but the output of the same above is different.
It has stripped the brackets and pulled the comma seperator as well. no matter what i do to braceexpand it doesn't come out like i need and it did in RHEL4.
We are running RHEL AS x86_64 OS versions for 4 and 5.
i talked to the SA and there is not a pdksh available for RHEL5 and that on the ksh is ksh93 which is a major rewrite of ksh for RHEL5 and is the first version of ksh available as Open Source. They are telling me it is the way it is and i can not find a way to make it work the way it was without rewriting lots of code. ksh on solaris systems and other are using ksh88. I was trying for consistent code cross platform. Guess that was wishful thinking.. Any other sugestions welcomed.
My response was NOT wrong. For your information I AM an SA and have been since 1991.
pdksh is "public domain korn shell" and as a "public domain" is "available" for any distro someone cares to take the effort to put it on. Your admin obviously realizing what Luser you are and not wanting to support two versions of ksh simply told you whatever he had to to make you go away.
Even if I had been wrong it would have been polite to simply thank me for my response then ask for further information but I guess your mom didn't raise you correctly.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.