:confused:
Is it possible to delete array elements dynamically.For instance,consider an array( a b c d ) ,now can i delete array (the third element 'c').So that the array becomes array(a b d)..
Thanks in advance!! (1 Reply)
hi guys,
i have the following script and when i run it i get blank lines on the screen.. i am trying to display the contents of array var..
#!/usr/bin/bash
var=`awk 'NR>20&&NR<31' try.sum | awk '{print $4}'`
echo "${var}" (1 Reply)
hi guys,
i have an array called ARRAY which has elements in it... i am trying to assign elements of ARRAY to master_array..
i get a =: command not found error..
i=0
while
do
${master_array}=${ARRAY}
((i++))
done
is there something i am missing? (4 Replies)
Hi,
I have 2 arrays.
I have to compute symmetric difference!
@arr=qw(19205134 18630215 18453487 18416242 18338715 18227590 17698645);
@arr1=qw(18227590 18053561 17698645 16966777);
#The code which i used is this!
@union = @isect = @diff = ();
%union = %isect = ();
%count =... (3 Replies)
Hi,
Could someone please help me with this? I have two arrays and I need to generate third array containing difference between the two. For example -
@Array1 = ;
@Array2 = ;
I would like to find difference between these two and generate third array that contains the difference. In... (5 Replies)
Hi,
I need an elegant solotion in php. I need to compare 2 arrays (array1 & array2), to find all instances of array 2 which is not in array1.
I don't want to see any instances of array1 wich is not in array2 (here "the")
Array1: This, is, the, data, of, array1
Array2: this, is, data, Of,... (2 Replies)
Hi All,
Got this 2 file namely a.txt and b.txt, i want to know how to extract the difference between the two files, the output will be written to a file.
e.g.
>>a.txt<<
Nokia 1100
Nokia 1200
Nokia 1300
Nokia 1400
Nokia 1500
Nokia 1600
Nokia 1700
Nokia 1701
Nokia 1702
Sagem 1100... (3 Replies)
trying to sum elements in an array using bc and getopt,i have a file with names and thier vaules if the names appears 3 times i should multiply its value with 3 then find the sum of all the elements together
cat foo.txt
max 2.3
henry 3
fransis 4.5
max 2.3
henry 3
max 2.3
it should... (1 Reply)
I have the following code and for some reason when I call the program using
/home/tcdata/tatsh/trunk/hstmy/bin/bash/raytrac.bash --cmod=jcdint.cmod
I get
hasArgument =
hasArgument = true
Somehow the array element is returning even though I have not chosen the option.
... (41 Replies)