LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-08-2014, 03:57 PM   #1
maddyfreaks
Member
 
Registered: May 2011
Posts: 70

Rep: Reputation: 0
Help with Array printing in KSH on RHEL


Hi Experts,

Need some idea... as am out of ideas.

I have an array which will get all the values through my argument to script.
my script name is get_entries.ksh

./get_entries.ksh "A123,B223"

#!/bin/ksh -p
set -A my_array $1
PLIST=="-O"\"ALL_LIST={${my_array[@]}}\"""
<other_script> "$PLIST"


Then i need to call other script and pass this PLIST as argument to this .... it should like below

<other script> -O"ALL_LIST={A123,B123}"

but i am getting an error like thi s...
<other script> -O"ALL_LIST={}"

ALL_LIST cannot be empty.

So what i see is .. the array is not getting passed.

Please help

OS - RHEL 5
Shell can only be KSH
 
Old 03-08-2014, 08:54 PM   #2
maddyfreaks
Member
 
Registered: May 2011
Posts: 70

Original Poster
Rep: Reputation: 0
Your help is appreciated
 
  


Reply


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
problem to initialize ksh array when first element includes hyphen gdan2000 Programming 5 07-20-2011 05:06 AM
[SOLVED] How can I list string indexes from an array in ksh ? johnsee Programming 4 01-24-2011 05:07 AM
[SOLVED] printing array in awk ghantauke Linux - Newbie 3 11-24-2010 10:16 AM
Cron & ksh: Solaris/RHEL 2 incompatibility marist89 Linux - Software 1 01-21-2004 04:48 PM
error printing array's phek Programming 2 06-05-2002 07:59 AM


All times are GMT -5. The time now is 08:02 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration