Hi,
The following test case populate an array named: array3.
Since array1 and array2 are equal in length and values array3 will remain empty.
Here are the results:
=====================================================
Now i took the same logic from this test and insreted it into another script.
This time i am getting an error regarding to array3.
I printed all the necessary information
Could you please tell me why i am getting an error in this case:
The relevant function is:
Running the function raised the foollowing error:
Thanks
Last edited by otheus; 12-05-2008 at 08:07 AM..
Reason: Added [code] tags
This line is suspect:
[code]
${array3[i]}=$ELE2
[code]
array3 is not yet initialized, so its contents are empty, so it can't evaluate to any variable which $ would expand to. Maybe you mean:
Try that.
For the record, I already tried telling mgmt and the users to disallow spaces in filenames for this script, but it isn't happening for a number of ID10T-error-based reasons.
I have simple list of 3 files in a directory that are named like this:
bash-3.2$ ls -1 file*
file1
file1 part2... (2 Replies)
Dipping around in python again and need to create a def that will populate a list(content) with the files that os.walk finds from within this directory and then I will re.search through each files looking for content. In learning Python, can someone point me in the right direction. This is what I... (3 Replies)
Hi,
I have to create a JList and the items I need to display are store in HashMap table. What would be the easiest way to populate this JList. Basically the items I want to display/show in the JList are the key values of the HashMap. Thanks in advance for any suggestions. (0 Replies)
So, here's a scenario that requires the same logic as what I'm working on: Suppose that you have a directory containing files named after users. For awk's purposes, the filename is a single field-- something parse-friendly, like john_smith. Now, let's say that I'd like to populate an array in... (2 Replies)
Guys,
I need to iterate populate an array while going over files in directory. Can someone please tell me syntax I tried this but it isn't working ==>
for F in `ls -p "${directory1}" | grep -v "\/"`
do
cd "${directory2}"
cmp "${directory2}"/"${F}" "${directory1}"/"${F}" ... (2 Replies)
Hi.
I have a file with the following structer:
DB DISK LOCATION SIZE
============================================
PROD DATA_01 /dev/dm-23 10
PROD DATA_02 /dev/dm-24 10
PROD DATA_03 /dev/dm-25 10
DEV DATA_04 /dev/dm-26 10
DEV DATA_05 ... (1 Reply)
Hi,
I'm looking for help trying to parse a data stream. Any help would be greatly appreciated.
My awk statement is
awk '/Aug/{a=$2}/vol/{print a, host, $1, $2, $3, $4, $5}' out.txt
Sample Data Stream "out.txt"
-----------------------------
# Aug 3 00:00:00 2008
===== DF =====... (3 Replies)
i have installed vmware on a text base linux node
now i have to vmware-configure.pl to do the initial configuration
now 1st step it askes for agreeing for a " License Agreement"
for that i have to say "q" and "yes" to Accept it
i want to run a script with does these 3 steps... (6 Replies)
Hi,
I have 2 processes X and Y. Y is exec() from X. In Y i have an exit handler, which is called when i return from main. With in exit handler i delete and object which in turn calls the destructor of the object, which terminates all the threads of Y.
I believe that SIGCHLD is raised by Y as... (4 Replies)