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
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
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
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
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
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
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
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
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
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
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
LEARN ABOUT DEBIAN
graphviz::parse::yapp
GraphViz::Parse::Yapp(3pm) User Contributed Perl Documentation GraphViz::Parse::Yapp(3pm)
NAME
GraphViz::Parse::Yapp - Visualise grammars
SYNOPSIS
use GraphViz::Parse::Yapp;
# Pass in a file generated via yapp -v
my $g = GraphViz::Parse::Yapp->new('Yapp.output');
print $g->as_png;
DESCRIPTION
This module makes it easy to visualise Parse::Yapp grammars. Writing Parse::Yapp grammars is tricky at the best of times, and grammars
almost always evolve in ways unforseen at the start. This module aims to visualise a grammar as a graph in order to make the structure
clear and aid in understanding the grammar.
Rules are represented as nodes, which have their name on the left of the node and their productions on the right of the node. The subrules
present in the productions are represented by edges to the subrule nodes.
Thus, every node (rule) should be connected to the graph - otherwise a rule is not part of the grammar.
This uses the GraphViz module to draw the graph. Thanks to Damian Conway for the original idea.
METHODS
new
This is the constructor. It takes one mandatory argument, which is a filename of the output file generated by running "yapp -v " on the
grammar file. For example, if your Parse::Yapp grammar file is called "calc.yp", you would run "yapp -v calc.yp" and pass in "calc.output"
as an argument here. A GraphViz object is returned.
# Pass in a file generated via yapp -v
my $graph = GraphViz::Parse::Yapp->new('Yapp.output');
print $g->as_png;
as_*
The grammar can be visualised in a number of different graphical formats. Methods include as_ps, as_hpgl, as_pcl, as_mif, as_pic, as_gd,
as_gd2, as_gif, as_jpeg, as_png, as_wbmp, as_ismap, as_imap, as_vrml, as_vtx, as_mp, as_fig, as_svg. See the GraphViz documentation for
more information. The two most common methods are:
# Print out a PNG-format file
print $g->as_png;
# Print out a PostScript-format file
print $g->as_ps;
AUTHOR
Leon Brocard <acme@astray.com>
COPYRIGHT
Copyright (C) 2001, Leon Brocard
This module is free software; you can redistribute it or modify it under the same terms as Perl itself.
perl v5.14.2 2012-04-02 GraphViz::Parse::Yapp(3pm)