10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All,
need help with reading the array and sum of the array elements.
given an array of integers of size N . You need to print the sum of the elements in the array, keeping in mind that some of those integers may be quite large.
Input Format
The first line of the input consists of an... (1 Reply)
Discussion started by: nishantrefound
1 Replies
2. Shell Programming and Scripting
I want to extract XML block surrounding search string
Ex: print XML block for string "myapp1-ear" surrounded by "<application> .. </application>"
Input XML:
<?xml version="1.0" encoding="UTF-8"?>
<deployment-request>
<requestor>
<first-name>kchinnam</first-name>
... (16 Replies)
Discussion started by: kchinnam
16 Replies
3. Shell Programming and Scripting
Hi all
I have a great challenge that I am not able to resolve.
Briefly, I have a file like this:
ID_1 chr1 100 -
ID_2 chr2 300 +
and another file like this:
name_1 chr1 150 no -
name_2 chr1 250 yes -
name_3 chr2 350 yes +
name_4 chr2 280 yes +
Well, for each entry in file1 I would... (2 Replies)
Discussion started by: giuliangiuseppe
2 Replies
4. Shell Programming and Scripting
Hi,
Need your help for this scripting issue I have. I am not really good at this, so seeking your help.
I have a file looking similar to this:
Hello, i am human and name=ABCD.
How are you?
Hello, i am human and name=PQRS.
I am good.
Hello, i am human and name=ABCD.
Good bye.
Hello, i... (12 Replies)
Discussion started by: royzlife
12 Replies
5. Shell Programming and Scripting
Hi ,
I have been trying to write a perl script to do this job. But i am not able to achieve the desired result. Below is my code.
my $current_value=12345;
my @users=("bob","ben","tom","harry");
open DBLIST,"<","/var/tmp/DBinfo";
my @input = <DBLIST>;
foreach (@users)
{
my... (11 Replies)
Discussion started by: chidori
11 Replies
6. Shell Programming and Scripting
Hi
I have requirement to search string starting with specific characters and print whole matching word in that string.
example
mystr="ATTRIBUTE NAME="Event Name" VALUE="Execute""
I want to search by passing "NAME=" and result should be NAME="Event Name".
i am using below command but... (3 Replies)
Discussion started by: tmalik79
3 Replies
7. Shell Programming and Scripting
I am trying to do a comparison to see if these two string arrays match.
I have tried assigning the array variable to another variable to get it to work but i can't figure it out. Here is what I have.
#example of items that could be in the array
#string="TEST"... (3 Replies)
Discussion started by: zatarra777
3 Replies
8. Shell Programming and Scripting
How can I get my array to understand the double-quotes I'm passing into it are to separate text strings and not part of an element? here's what I'm working with...
db2 -v connect to foo
db2 -x "select '\"' || stats_command || '\",' from db2law1.parallel_runstats where tabname = 'BAZ'"
set... (4 Replies)
Discussion started by: djschmitt
4 Replies
9. Shell Programming and Scripting
I need to use array elements while pattern matching.
@myarr = (ELEM1, ELEM2, ELEM3);
following is the statement which I am using in my code. Basically I want to replace the ELEM1/2/3 with other thing which is mentioned as REPL here.
if (condition) {
s/(ELEM1|ELEM2|ELEM3): REPL: /;
}
I... (3 Replies)
Discussion started by: deo_kaustubh
3 Replies
10. Shell Programming and Scripting
Hi All
I want to search a string from an array in Perl. If a match occurs, assign that string to a variable else assign 'No match'. I tried writing the script as follows but it's in vain. Please help me..
#!/usr/bin/perl
use strict;
my $NER;
my @text=("ORG","PER");
... (4 Replies)
Discussion started by: my_Perl
4 Replies