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::Dia::SQL(3pm)					User Contributed Perl Documentation				      Parse::Dia::SQL(3pm)

NAME
Parse::Dia::SQL - Convert Dia class diagrams into SQL. SYNOPSIS
use Parse::Dia::SQL; my $dia = Parse::Dia::SQL->new( file => 't/data/TestERD.dia', db => 'db2' ); print $dia->get_sql(); # or command-line version perl parsediasql --file t/data/TestERD.dia --db db2 DESCRIPTION
Dia is a diagram creation program for Linux, Unix and Windows released under the GNU General Public License. Parse::Dia::SQL converts Dia class diagrams into SQL. Parse::Dia::SQL is the parser that interprets the .dia file(s) into an internal datastructure. Parse::Dia::SQL::Output (or one of its sub classes) can take the datastructure and generate the SQL statements it represents. MODELLING HOWTO
See <http://tedia2sql.tigris.org/usingtedia2sql.html> Modelling differences from tedia2sql o Index options are supported. Text is taken from the comments field of the operation, i.e. the index. A database specific default value is used if the comments field is left blank. Consult the Output sub class' constructor. o Type mapping is supported. A type mapping is a user-defined column name replacement. Unlike tedia2sql the type mapping is non- recursive. Consult "t/data/typemap.dia" for an example. o Preliminary support for Dia's database shapes is added. o Table comments are used as table postfix options. This means per-table options (e.g. partitioning options) are supported on a per- database level. o backticks notation is supported for MySQL-InnoDB. DIA VERSIONS
Parse::Dia::SQL has been tested with Dia versions 0.93 - 0.97. Parse::Dia::SQL uses the XML "version" tag information in the .dia input file to determine how each XML construct is formatted. Future versions of Dia may change the internal format, and XML "version" tag is used to detect such changes. DATABASE SUPPORT
The following databases are supported: DB2 Informix Ingres Oracle Postgres Sas SQLite3 Sybase MySQL InnoDB MySQL MyISAM Adding support for additional databases means to create a subclass of Parse::Dia::SQL::Output. Patches are welcome. AUTHOR
Parse::Dia::SQL is based on tedia2sql by Tim Ellis and others. See the AUTHORS file for details. Modified by Andreas Faafeng, "<aff at cpan.org>" for release on CPAN. BUGS
Please report any bugs or feature requests to "bug-parse-dia-sql at rt.cpan.org", or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Parse-Dia-SQL <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Parse-Dia-SQL>. 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::Dia::SQL You can also look for information at: o Project home Documentation and public source code repository: <http://tedia2sql.tigris.org/> o RT: CPAN's request tracker http://rt.cpan.org/NoAuth/Bugs.html?Dist=Parse-Dia-SQL <http://rt.cpan.org/NoAuth/Bugs.html?Dist=Parse-Dia-SQL> o AnnoCPAN: Annotated CPAN documentation http://annocpan.org/dist/Parse-Dia-SQL <http://annocpan.org/dist/Parse-Dia-SQL> o CPAN Ratings http://cpanratings.perl.org/d/Parse-Dia-SQL <http://cpanratings.perl.org/d/Parse-Dia-SQL> o Search CPAN http://search.cpan.org/dist/Parse-Dia-SQL <http://search.cpan.org/dist/Parse-Dia-SQL> SEE ALSO
o <http://tedia2sql.tigris.org/> o <http://live.gnome.org/Dia> ACKNOWLEDGEMENTS
See the AUTHORS file. LICENSE
This program is released under the GNU General Public License. TERMINOLOGY
By database we mean relational database managment system (RDBMS). METHODS
new() The constructor. Mandatory arguments: file - The .dia file to parse db - The target database type Dies if target database is unknown or unsupported. get_sql() Return sql for given db. Calls underlying methods that performs parsing and sql generation. perl v5.14.2 2012-02-01 Parse::Dia::SQL(3pm)
All times are GMT -4. The time now is 12:24 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy