Sponsored Content
Top Forums UNIX for Beginners Questions & Answers Parse 'sections' of the file and print Post 303045521 by Neo on Monday 30th of March 2020 12:29:11 AM
Old 03-30-2020
Please post the script you have designed and written so far, to solve your problem.

Please put some effort into your own script and try; and when you post your best attempt, please post all sample input, output, error messages and your script.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

To parse through the file and print output using awk or sed script

suppose if u have a file like that Hen ABCCSGSGSGJJJJK 15 Cock ABCCSGGGSGIJJJL 15 * * * * * * : * * * . * * * : Hen CFCDFCSDFCDERTF 30 Cock CHCDFCSDHCDEGFI 30 * . * * * * * * * : * * :* : : . The output shud be where there is : and . It shud... (4 Replies)
Discussion started by: cdfd123
4 Replies

2. UNIX for Advanced & Expert Users

extract multiple sections of a file

I have a file that I need to parse multiple sections from the file. The file contains multiple lines that start with ST (Abunch of data) Then the file contains multiple lines that start with SE (Abunch of data) SE*30*0001 ... (1 Reply)
Discussion started by: rgentis
1 Replies

3. Shell Programming and Scripting

extract multiple sections of file

I have a file that I need to parse multiple sections from the file. The file contains multiple lines that start with ST (Abunch of data) Then the file contains multiple lines that start with SE (Abunch of data) SE*30*0001 ST*810*0002 I need all of the lines between and including these.... (6 Replies)
Discussion started by: rgentis
6 Replies

4. Shell Programming and Scripting

Best way to remove sections of text from a file

Greetings! I found this fourm via a google search on "sed expressions". I have a file that contains notices and they are all the same length in lines. For example the file would contains 15 notices, each being 26 lines each. I need some way to eliminate notices that contain a "S" in a particular... (8 Replies)
Discussion started by: cals64
8 Replies

5. Shell Programming and Scripting

Parsing file, yaml file? Extracting specific sections

Here is a data file, which I believe is in YAML. I am trying to retrieve just the 'addon_domains" section, which doesnt seem to be as easy as I had originally thought. Any help on this would be greatly appreciated!! I have been trying to do this in awk and mostly bash scripting instead of perl... (3 Replies)
Discussion started by: Rhije
3 Replies

6. Shell Programming and Scripting

Modify sections of the line in a file

Hello.. I have a line in a file which I have to edit: the line looks like: <!]> Sometimes, the section of the line can have only one entry for cn, or maybe more than 2 like below: <!]> I have a variable which has the following value: CN="(cn=MNO)(cn=XYZ)" I need to replace the part... (4 Replies)
Discussion started by: chiru_h
4 Replies

7. Programming

extract different sections of a file

Hi All, I have a file with the data 10;20;30;40;50;60;70;80;123;145;156;345. the output i want is the first fourth sixth elements and everything from there on. How do i achieve this. (1 Reply)
Discussion started by: raghu_shekar
1 Replies

8. Shell Programming and Scripting

awk removing sections of a file

I have a file that looks liek this (see below). can somebody provide me with and awk or sed command that can take a piece of the file starting from the time to the blank line and put in into another file. For example: How would I get the data from 10:56:11 to the blank line. Two things: ... (5 Replies)
Discussion started by: BeefStu
5 Replies

9. Shell Programming and Scripting

Omitting sections of file that contain word

I have a configuration file that contains hundreds of these chunks. Each "chunk" is the section that begins with "define service {" and ends with "}". define service { check_command check_proc!java hostgroup_name service_description ... (5 Replies)
Discussion started by: SkySmart
5 Replies

10. UNIX for Dummies Questions & Answers

Help on parsing Oracle RMAN output for string and print sections of a file

Hi, I need some advise on how to print 'sections' of the attached file. I am searching for some that says Marked Corrupt and print some lines after it. At the moment I am running the command below: sed -n -e '/Marked Corrupt/{N;N;p;}' rman_list_validate.txtThis gives me the following... (1 Reply)
Discussion started by: newbie_01
1 Replies
Parse::ErrorString::Perl(3pm)				User Contributed Perl Documentation			     Parse::ErrorString::Perl(3pm)

NAME
Parse::ErrorString::Perl - Parse error messages from the perl interpreter VERSION
version 0.15 SYNOPSIS
use Parse::ErrorString::Perl; my $parser = Parse::ErrorString::Perl->new; # or: my $parser = Parse::ErrorString::Perl->new(lang => 'FR') # to get localized explanations my @errors = $parser->parse_string($string_containing_stderr_output); foreach my $error(@errors) { print 'Captured error message "' . $error->message . '" in file ' . $error->file . ' on line ' . $error->line . " "; } METHODS
new(lang => $lang) Constructor. Receives an optional "lang" parameter, specifying that error explanations need to be delivered in a language different from the default (i.e. English). Will try to load "POD2::$lang::perldiag". parse_string($string) Receives an error string generated from the perl interpreter and attempts to parse it into a list of "Parse::ErrorString::Perl::ErrorItem" objects providing information for each error. SEE ALSO
splain ACKNOWLEDGEMENTS
Part of this module is based on code from splain. BUGS
Please report any bugs or feature requests to "bug-parse-errorstring-perl at rt.cpan.org", or through the web interface at <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Parse-ErrorString-Perl>. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes. SUPPORT
You can find documentation for this module with the perldoc command. perldoc Parse::ErrorString::Perl o RT: CPAN's request tracker <http://rt.cpan.org/NoAuth/Bugs.html?Dist=Parse-ErrorString-Perl> o AnnoCPAN: Annotated CPAN documentation <http://annocpan.org/dist/Parse-ErrorString-Perl> o CPAN Ratings <http://cpanratings.perl.org/d/Parse-ErrorString-Perl> o Search CPAN <http://search.cpan.org/dist/Parse-ErrorString-Perl/> AUTHORS
o Petar Shangov, "<pshangov at yahoo.com>" o Gabor Szabo <http://szabgab.com/> o Ahmad M. Zawawi <ahmad.zawawi@gmail.com> COPYRIGHT AND LICENSE
This software is copyright (c) 2010 by Petar Shangov. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. perl v5.10.1 2010-11-29 Parse::ErrorString::Perl(3pm)
All times are GMT -4. The time now is 03:14 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy