10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I have script like below:
#!/usr/local/bin/perl
use strict;
use warnings;
while (<DATA>) {
( my ($s_id) = /^\d+\|(\d+?)\|/ ) ;
if ( $s_id == 1 ){
s/^(.*\|)*.*ABC\.pi=(+|+)*.*ABC\.id=(\d+|+).*$/$1$2|$3/s;
print "$1$2|$3\n"; (2 Replies)
Discussion started by: sol_nov
2 Replies
2. Homework & Coursework Questions
Florida State University, Tallahassee, FL, USA, Dr. Whalley, COP4342 Unix Tools.
This program takes much of my previous assignment but adds the functionality of printing the concatenated line numbers found within the input.
Sample input from <> operator:
Hello World
This is hello
a sample... (2 Replies)
Discussion started by: D2K
2 Replies
3. Linux
Hi all,
I have a text data file. My aim here is to find line called *FIELD* AV for every record and print lines after that till *FIELD* RF. But here I want first 3 to four lines for very record as well. FIELD AV is some where in between for very record. SO I am not sure how to retrieve lines in... (2 Replies)
Discussion started by: kaav06
2 Replies
4. Shell Programming and Scripting
hi dudes, I nee you kind assistance, I have to find the matched numbers from 2 text files and output of matched numbers should be in another text file..
I do have text files like this , for example
File 1
787
665*5-p
5454
545-p
445-p
5454*-p
File 2
5455
787
445-p
4356
2445
144
... (3 Replies)
Discussion started by: sureshraj
3 Replies
5. Shell Programming and Scripting
Hi,
I have the file contents:
Start,End,Req,Resp
12:39,12:40,4,5
The sting to be matched is: Req and Resp.
parsefile("Req,Resp");
Here is the code.
sub parsefile ($)
{
$header=shift; (2 Replies)
Discussion started by: vanitham
2 Replies
6. Shell Programming and Scripting
Hi,
I want to match the time in the file and retrieve those contents of the file.
I am taking only first two parameters of localtime(time) function minutes and seconds so partial match i am performing.
For Example
$start = "14:23";
$end = "14:30";
I am matching file contents... (3 Replies)
Discussion started by: vanitham
3 Replies
7. Shell Programming and Scripting
For each value in file1 it has to check in file2 and file3.
If value matched it has to delete that value and related group value
in file2 and file3.
In this example it takes A , deletes A and take related group value 1 and
deletes E-1,then checks in file3 and deletes K-1.After that it takes D... (7 Replies)
Discussion started by: kanagaraj
7 Replies
8. Shell Programming and Scripting
Hi,
I have an array with 3 words in it and i have to match all the array contents and display the exact matched sentence i.e all 3 words should match with the sentence.
Here are sentences.
$arr1="Our data suggests that epithelial shape and growth control are unequally affected depending... (5 Replies)
Discussion started by: vanitham
5 Replies
9. Shell Programming and Scripting
Hi,
If there exist multiple pattern in a file, how can I find the last record matching the pattern through perl.
The below script searches for the pattern everywhere in an input file.
#! /usr/bin/perl -s -wnl
BEGIN {
$pattern or
warn"Usage: $0 -pattern='RE' \n" and
exit 255;... (5 Replies)
Discussion started by: er_ashu
5 Replies
10. Shell Programming and Scripting
Hi all,
I just learnt Perl and I encountered a problem in my current project.
For a verilog file, i am required to write a PERL script that could match pattern to output nitrolink and nitropack. I wont know what name to grep except the pattern below.
the verilog file:
nitrolink nitrolink... (1 Reply)
Discussion started by: kimhuat
1 Replies