10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
ok, so here is the issue, I have 2 arrays.
I need to be able to create a loop that will find ${ARRAY1 in the text doc, and replace it with ${ARRAY2 then write the results. I already have that working. The problem is, I need it to do that same result across however many items are in the 2... (2 Replies)
Discussion started by: gentlefury
2 Replies
2. Shell Programming and Scripting
Hi firnds,
I am having two arrays
eg. @a=qw(1 2 3 4) and @b=qw(1 3 6 9)
Now, I want to compare two arrays on first index of both arrays and if they matched, it should output remaining indexes
Pseudo-code
if ($a == $b)
{ print "remaining indexes";}
How can i do this using perl? (1 Reply)
Discussion started by: Renesh
1 Replies
3. Shell Programming and Scripting
Hi all,
Not sure if this should be in the programming forum, but I believe it will get more response under the Shell Programming and Scripting FORUM.
Am trying to write a customized df script in Perl and need some help with regards to using arrays and file handlers.
At the moment am... (3 Replies)
Discussion started by: newbie_01
3 Replies
4. Shell Programming and Scripting
I have an array and two variables as below,
I need to check if $datevar is present in $filename.
If so, i need to replace $filename with the values in the array.
I need the output inside an ARRAY
How can this be done.
Any help will be appreciated. Thanks in advance. (2 Replies)
Discussion started by: irudayaraj
2 Replies
5. Shell Programming and Scripting
Hi everyone
I have one question about using array in perl. let say I have several log file in one folder.. example
test1.log
test2.log
test3.log
and the list goes on..
how to make an array for this file? It suppose to detect log file in the current directory and all the log file will... (3 Replies)
Discussion started by: sayachop
3 Replies
6. Shell Programming and Scripting
Hi Everyone,
#!/usr/bin/perl
use strict;
use warnings;
my @test=("a;b;qqq;c;d","a;b;ggg;c;d","a;b;qqq;c;d");
would like to split the @test array into two array:
@test1=(("a;b;qqq;c;d","a;b;qqq;c;d"); and @test2=("a;b;ggg;c;d");
means search for 3rd filed.
Thanks
find the... (0 Replies)
Discussion started by: jimmy_y
0 Replies
7. Shell Programming and Scripting
Basically to illuminate i want to take a file with mutliple lines,
C:\searching4theseletters.txt
a
b
c
Read this into an array
@ARRAY
and then use this to compare against another file
C:\inputletters.txt
b
o
a
c
n
a (9 Replies)
Discussion started by: bradleykins
9 Replies
8. Shell Programming and Scripting
Hi,
In a kshell , i need to compare the results of two array .
each Non-match value should copy to a new array.
For example:
==========
Array one contain the following values:
A
B
C
Array two contain the following values:
C
F
A
E
After comparing this arrays , a new array should... (4 Replies)
Discussion started by: yoavbe
4 Replies
9. UNIX for Dummies Questions & Answers
# tail myprocesses.txt
178 processes at Tue Oct 21 14:33:01 IST 2008
16 MySQL processes at Tue Oct 21 14:33:01 IST 2008
175 processes at Tue Oct 21 14:36:01 IST 2008
60 MySQL processes at Tue Oct 21 14:36:01 IST 2008
192 processes at Tue Oct 21 14:39:01 IST 2008
64 MySQL processes at Tue Oct... (2 Replies)
Discussion started by: shantanuo
2 Replies
10. Shell Programming and Scripting
I am trying to use a script to replace the header of each file, whose filename are stored within the array $test, using the sed command within a Perl script as follows:
$count = 0;
while ( $count < $#test )
{
`sed -e 's/BIOGRF 321/BIOGRF 332/g' ${test} > 0`;
`cat 0 >... (2 Replies)
Discussion started by: userix
2 Replies