LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Closed Thread
  Search this Thread
Old 03-11-2008, 12:57 PM   #1
kcarmi01
LQ Newbie
 
Registered: Mar 2008
Posts: 4

Rep: Reputation: 0
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.

Output: ksh shell environment settings

CLUSTER_NODES='{"usplselux140","usplselux141"}'
echo $CLUSTER_NODES
"usplselux140" "usplselux141"

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.

You help is appreciated.
 
Old 03-11-2008, 07:43 PM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
The ksh on RHEL4 is pdksh which isn't the one on RHEL5. (You can verify what you have with rpm -qa |grep ksh).

It may be that what you're doing works in pdksh but not the other ksh (maybe a bug). Maybe installing pdksh on the RHEL5 box would help.
 
Old 03-12-2008, 04:51 PM   #3
kcarmi01
LQ Newbie
 
Registered: Mar 2008
Posts: 4

Original Poster
Rep: Reputation: 0
wrong response

Last edited by kcarmi01; 03-12-2008 at 05:02 PM.
 
Old 03-12-2008, 04:53 PM   #4
kcarmi01
LQ Newbie
 
Registered: Mar 2008
Posts: 4

Original Poster
Rep: Reputation: 0
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.
 
Old 03-13-2008, 07:36 PM   #5
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
Quote:
Originally Posted by kcarmi01 View Post
wrong response
You are the rudest moron to ever post.

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.

 
  


Closed Thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
RHEL5 braceexpand in KSH not working the same as RHEL4 HELP! kcarmi01 Linux - Newbie 0 03-11-2008 11:01 AM
RHEL4 vs RHEL5 new database servers dfezz1 Linux - Enterprise 1 03-05-2008 11:08 AM
Help: rhel4->rhel5==>Matlab consumes more memory pronuncer Linux - Kernel 4 01-18-2008 05:40 PM
how to uninstall rhel4 &rhel5 O/S jagadeesh.nagireddy Linux - Enterprise 2 10-17-2007 08:53 PM
Rhel4/ Rhel5 rehan999 Linux - Software 2 08-31-2007 11:42 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 04:38 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration