Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Counters and arrays help needed! Post 302131099 by gazz1982 on Thursday 9th of August 2007 07:34:42 AM
Old 08-09-2007
Counters and arrays help needed!

I am trying to write a program in a script .sh

I have a list of coordinates ie
e1=123 n1=123
e2=456 n2=456
e3=789 n3=789

I have a counter starting at 1
for (( i=1; i<=2; i++))
i need coordinate=123,123
then on the second loop
coordinate=456,456 etc...

I tried doing:

Code:
#e=0 n=0 < just to show what e and n return
#Coordinates
e1=123 n1=123
e2=456 n2=456

coordinate = $e$i,$n$i

this will not work it returns 01,02

i need it to think coordinate=$e$i = $e1 = 123
and coordinate=$n$i = $n1 = 123

can any one help?

Thanks

Gary
 

8 More Discussions You Might Find Interesting

1. Solaris

netstat counters

Is there a way to reset the netstat counters in solaris 8? Specifically, the error counters? (1 Reply)
Discussion started by: tjlst15
1 Replies

2. UNIX for Dummies Questions & Answers

Unix performance monitoring counters

Which performance counters you might to define as "The most important counters in checking unix performance" (3 Replies)
Discussion started by: gen4ik
3 Replies

3. Shell Programming and Scripting

Arrays

Dear all, How can i unset arrays. I mean all the subscripts including the array after using them. Could you direct me to some links of array memory handling in the korn shell. Thanks (2 Replies)
Discussion started by: earlysame55
2 Replies

4. Web Development

PHP arrays in arrays

PHP question... I have an SQL query that's pulled back user IDs as a set of columns. Rather than IDs, I want to use their names. So I have an array of columns $col with values 1,7,3,12 etc and I've got an array $person with values "Fred", "Bert", "Tom" etc So what I want to do is display the... (3 Replies)
Discussion started by: JerryHone
3 Replies

5. Shell Programming and Scripting

using existing variables as counters in a "for" loop ?

Hi all, I am rather new to shell programing I am trying to run a loop through variables that already exist, here is (a part of ) the code, variables param_kz etc already exist (in the same file, i do not run another script file etc) and have values assigned to them (strings, "y" or "n") echo... (1 Reply)
Discussion started by: babulin2002
1 Replies

6. Programming

question about int arrays and file pointer arrays

if i declare both but don't input any variables what values will the int array and file pointer array have on default, and if i want to reset any of the elements of both arrays to default, should i just set it to 0 or NULL or what? (1 Reply)
Discussion started by: omega666
1 Replies

7. Programming

Arrays in C++

I've noticed something interesting in C++ programming. I've always done tricky stuff with pointers and references to have functions deal with arrays. Doing exercises again out of a C++ book has shown me an easier way, I didn't even know was there. It's weird to me. When dealing with arrays, it... (4 Replies)
Discussion started by: John Tate
4 Replies

8. UNIX for Dummies Questions & Answers

How to print based on the value from counters?

Hi, I am writing a script which will get the input from a combinations of awk commands and using counters and loop I am generating a dynamic values and passing the output to a file using print -u3 options, now instead of redirecting the output to a file how can the output be created in the same... (3 Replies)
Discussion started by: shruthidwh
3 Replies
SOAP::Deserializer(3)					User Contributed Perl Documentation				     SOAP::Deserializer(3)

NAME
SOAP::Deserializer - the means by which the toolkit manages the conversion of XML into an object managable by a developer DESCRIPTION
SOAP::Deserializer provides the means by which incoming XML is decoded into a Perl data structure. METHODS
context This provides access to the calling context of "SOAP::Deserializer". In a client side context the often means a reference to an instance of SOAP::Lite. In a server side context this means a reference to a SOAP::Server instance. EXAMPLES
DESERIALIZING RAW XML INTO A SOAP::SOM OBJECT A useful utility for SOAP::Deserializer is for parsing raw XML documents or fragments into a SOAP::SOM object. SOAP::Lite developers use this technique to write unit tests for the SOAP::Lite module itself. It is a lot more efficient for testing aspects of the toolkit than generating client calls over the network. This is a perfect way for developers to write unit tests for their custom data types for example. Here is an example of how raw XML content can be parsed into a SOAP::SOM object by using SOAP::Deserializer: $xml = <<END_XML; <foo> <person> <foo>123</foo> <foo>456</foo> </person> <person> <foo>789</foo> <foo>012</foo> </person> </foo> END_XML my $som = SOAP::Deserializer->deserialize($xml); COPYRIGHT
Copyright (C) 2000-2004 Paul Kulchenko. All rights reserved. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. AUTHORS
Byrne Reese (byrne@majordojo.com) perl v5.12.1 2008-03-15 SOAP::Deserializer(3)
All times are GMT -4. The time now is 05:26 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy