Adding to an array in an external file, and adding elements to it.

Login or Register to Reply

Thread Tools Search this Thread
# 9  
Old 3 Days Ago
Originally Posted by ignatius
Let me elaborate a little more on what i'd like to see... I'd like to be able to traverse the elements in the array with the arrow keys. That's essentially what i'm trying to do. I already have the code ready to accomplish this. I just need to be able to feed the function the name of the array. And that's it.
What prevents you from doing so?

What does this function look like?
# 12  
Old 3 Days Ago
This line right here:


It obviously isn't the array that needs to be called.
# 13  
Old 16 Hours Ago
Ok. I've made a lot of progress.

I'm having problems with this array now:

         const char *testarray[]={"Zero", "One", "Two", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine", "Ten"};

And this:


Which does this:

pbtelnet(selection, "26");


is a function to telnet to an address. The first argument is the hostname, the second is the port number, so, this iteration is telnetting to port 26 of the value of the "Zero" array element.

My question is, it works perfectly fine, but for some reason it telnets to I'm wondering why?

Also, how do I change the value of said element ("Zero")? At this point in time it seems to be set to "0".
I'm wondering how do I change that?

BTW, if you're looking for the source code to the

function, my paste on pastebin is still there.

Last edited by ignatius; 15 Hours Ago at 08:09 PM..
Login or Register to Reply

Thread Tools Search this Thread
Search this Thread:
Advanced Search

More UNIX and Linux Forum Topics You Might Find Helpful
Adding Two Array in shell script mukulverma2408 Shell Programming and Scripting 8 09-07-2017 05:19 PM
Solaris - Sendmail - Adding in external senders e-mails Mcasim Solaris 2 08-11-2017 04:36 AM
Help reading the array and sum of the array elements nishantrefound Shell Programming and Scripting 1 08-13-2016 07:43 AM
Adding an element to a bash array with a variable LMHmedchem Shell Programming and Scripting 4 03-11-2015 10:00 AM
How can we assign value to an array variable from an external file? mukulverma2408 Shell Programming and Scripting 6 07-12-2012 04:31 PM
Adding results of a find to an array Fly_Moe Shell Programming and Scripting 2 07-28-2011 03:31 PM
Help in adding in csv file mariselvam UNIX for Advanced & Expert Users 1 05-13-2011 03:03 AM
Adding new lines to a file + adding suffix to a pattern hemo21 Shell Programming and Scripting 7 06-14-2010 12:19 AM
Problem adding into an array field!!! talk2pawee Shell Programming and Scripting 5 06-11-2009 02:39 AM
Adding external disk array to a live server sbk1972 Solaris 1 04-17-2009 10:42 AM
Adding array element in KSH Shoeless_Mike Shell Programming and Scripting 3 12-17-2008 03:43 PM
Search array elements as file for a matching string mkbaral Shell Programming and Scripting 1 09-18-2008 04:20 AM
adding existing disks to a 3510 array malcqv Solaris 2 12-21-2007 03:40 AM
Help on adding file sizes llsmr777 UNIX for Dummies Questions & Answers 1 09-18-2007 02:58 PM
Adding from a file int007 Solaris 2 03-22-2005 07:05 PM