unset array[0] removes the element but still if i do echo ${array[0]} i get a null value moreover there are other ways of doing this but if an element of an array conatins spaces like below
array[0]='james young'
array[1]='mary'
array[2]='randy orton'
but these also fail to do the job
array=${array[@]:1} #removed the 1st element
now i want the new array to be like
array[0]='mary'
array[1]='
Hello All,
I have an Expect Script that ssh'es to a server and does some stuff.
In Expect there is a built-in Array Variable called "expect_out(buffer)" which contains all the output from the previous send command up until the expected output.
I want to pass the array "expect_out(buffer)" to a Procedure/Function I have.
I am new to ksh scripting, specially array.
Hi Guys! I need to solve this.
I want an array to be created by a certain calculation for which I created a function. Now this array is not getting created. See script below I want array b to be the factorial value of array element a. Help is needed. Thanks!
Code:
#!/bin/bash
.
So i have used arrays for a while now but I just notice in one of my arrays when using an array with 9+ items in it that after running a for loop on the array it was replacing the first array with what ever was last and I cant figure out why.
Here is my code.
Code:
#!/bin/bash
vm=( 0 1 2 3 4 5 6 7 8 9 10 )
echo before for loop array=${vm[@]}
for vm in ${vm[@]}
do
Good grief so this should be easy. Passing an array as an argument to a function.
Hello All,
Maybe I'm Missing something here but I have NOOO idea what the heck is going on with this....?
I have a Variable that contains a PATTERN of what I'm considering "Illegal Characters". So what I'm doing is looping
through a string containing some of these "Illegal Characters".
Hi,
I am new to perl and I have the following query please help here.
I have following array variables declaration
Code:
@pld1 = qw(00 01 02 03 04 05);
@pld2 = qw(10 11 12 13 14 15);
for(my $k=1;$k<=2;$k++)
{
//I want here to use @pld1 if $k is 1
// and @pld2 if $k is 2.
I am a beginner with C++ so please excuse my ignorance.
I am attempting to pass a dynamically created 2d array to a function.
The array the [3]x[variable] array is created like this.
//Create array for the transformed coords
double **transf;
transf = new double*[3];