Sponsored Content
Top Forums Shell Programming and Scripting grep the output between specific lines Post 302711889 by maddy.san on Monday 8th of October 2012 07:16:36 AM
Old 10-08-2012
Please help me in formatting output as below :

myown : 355.4 GB : 1234,0123,1345,1567,1456
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

retrieving specific lines from a file - can I use grep ?

Hi there, if i had a file that looked like this my_server1 red green blue yellow blue my_server2 blue blue yellow green blue my_server3 yellow (9 Replies)
Discussion started by: hcclnoodles
9 Replies

2. UNIX Desktop Questions & Answers

grep lines with two specific characters somewhere in the line

I'm having trouble with extracting certain lines from a file based on whether they have all the required fields. Original file: snt:594:Sam N This bpt:2342:Bob P That lr:123 wrp:23:Whoever Person cor:794 Desired output: snt:594:Sam N This bpt:2342:Bob P That wrp:23:Whoever Person ... (3 Replies)
Discussion started by: Chthonic
3 Replies

3. Shell Programming and Scripting

Remove a specific line from grep output string

Dear All I want to search string "1000" from input file and if it found i want remove line that contain 1000 and also remove 3 line above it and 2 line below it. INPUT FILE: BHAT-D 2 aaa ID CODE GS UPDATE MODE LANG MCO MCL NUMPAGES 50 ... (7 Replies)
Discussion started by: jaydeep_sadaria
7 Replies

4. Shell Programming and Scripting

Extracting specific lines of data from a file and related lines of data based on a grep value range?

Hi, I have one file, say file 1, that has data like below where 19900107 is the date, 19900107 12 144 129 0.7380047 19900108 12 168 129 0.3149017 19900109 12 192 129 3.2766666E-02 ... (3 Replies)
Discussion started by: Wynner
3 Replies

5. Shell Programming and Scripting

Problems to print specific lines with awk and grep...HELP!

Hi all I have data like this: model: 1, misfit value: 0.74987 1 1.182 1.735 2.056 1.867 2 0.503 1.843 2.018 1.888 3 2.706 2.952 2.979 1.882 4 8.015 3.414 3.675 1.874 ... (1 Reply)
Discussion started by: fedora2011
1 Replies

6. Shell Programming and Scripting

Grep only specific lines ordered by column/date

Hi everybody, I'd like to think I've been through the search tool not only on this site, but also on google too, but I haven't been able to find what I was looking for. If I might've missed something on this forum, please slap me in the face with a link that you consider useful for my query :D ... (4 Replies)
Discussion started by: dilibau
4 Replies

7. Shell Programming and Scripting

Grep all lines for a specific date in log-files

I need to grep all lines for "yesterday" in /var/log/messages. Dates are in the format "YYYY-MM-DD". (5 Replies)
Discussion started by: Padmanabhan
5 Replies

8. Shell Programming and Scripting

How to grep logs for errors and receive specific additional lines?

Hi there, I have a script that I've used to find errors in my Minecraft Server logs. But I'd like to refine that script to be more useful. Here is the script: grep -n "SEVERE" /minecraft/server.log | awk -F":" '{print $1-2 "," $1+10 "p"}' | xargs -t -i sed -n {} /minecraft/server.log >>... (15 Replies)
Discussion started by: nbsparks
15 Replies

9. UNIX for Dummies Questions & Answers

Grep specific lines

Hello I have a file with nearly 90000 lines in x,y,z format but have some lines that I do not need to show. Is there anyway to delete those 3 lines after every 288 lines. Eg I keep the first 288 lines delete (289, 290 291); keep the next 288 lines after those and so on... Thanks (6 Replies)
Discussion started by: Madiouma Ndiaye
6 Replies

10. Shell Programming and Scripting

Grep content between specific lines

cat file1 *FileHeader* Partition 0 Total Data Bytes 1416 Avg Bytes/Record 1416 Others 1 PRDX22.AUDIT_DATA_INFO Partition 4 Total Data Bytes 4615 Avg... (8 Replies)
Discussion started by: Veera_V
8 Replies
SVN::Notify::HTML(3pm)					User Contributed Perl Documentation				    SVN::Notify::HTML(3pm)

Name
       SVN::Notify::HTML - Subversion activity HTML notification

Synopsis
       Use svnnotify in post-commit:

	 svnnotify --repos-path "$1" --revision "$2" 
	   --to developers@example.com --handler HTML [options]

       Use the class in a custom script:

	 use SVN::Notify::HTML;

	 my $notifier = SVN::Notify::HTML->new(%params);
	 $notifier->prepare;
	 $notifier->execute;

Description
       This subclass of SVN::Notify sends HTML formatted email messages for Subversion activity, rather than the default plain text.

Prerequisites
       In addition to the modules required by SVN::Notify, this class requires:

       HTML::Entities

Usage
       To use SVN::Notify::HTML, simply follow the instructions in SVN::Notify, but when using svnnotify, specify "--handler HTML".

Class Interface
   Constructor
       new

	 my $notifier = SVN::Notify::HTML->new(%params);

       Constructs and returns a new SVN::Notify object. All parameters supported by SVN::Notity are supported here, but SVN::Notify::HTML supports
       a few additional parameters:

       linkize
	     svnnotify --linkize

	   A boolean attribute to specify whether or not to "linkize" the SVN log message--that is, to turn any URLs or email addresses in the log
	   message into links.

       css_url
	     svnnotify --css-url http://example.com/svnnotify.css

	   URL for a CSS file that will can style the HTML output by SVN::Notify::HTML or its subclasses. Note that the URL will be added to the
	   output via a "<link rel="stylesheet">" tag after the CSS generated by SVN::Notify::HTML or its subclasses. What that means is that the
	   CSS file specified by "css_url" need not completely style the HTML, but simply override the default settings. This approach nicely
	   takes advantage of the "cascading" abilities of CSS.

       ticket_map
	     svnnotify --ticket-map '(BUG-(d+))=http://bugs.example.com/?show=%s'

	   This attribute is inherited from SVN::Notify, but its semantics are slightly different: the regular expression passed as the regular
	   expression used for the key should return two matches instead of one: the text to link and the ticket ID itself. For example,
	   '(BUG-(d+))' will match "BUG-1234567", and "BUG-1234567" will be used for the link text, while "1234567" will be used to fill in the
	   "ticket_url" format string. The first set of parentheses capture the whole string, while the parentheses around "d+" match the number
	   only. Also note that it is wise to use "" on either side of the regular expression to insure that you don't get spurious matches.	So
	   a better version would be '(BUG-(d+))'.

	   As a fallback, if your regular expression returns only a single match string, it will be used both for the link text and for the the
	   ticket URL generated from "ticket_url". For example, 'BUG-(d+)' would make a link only of the number in 'BUG-1234567', as only the
	   number has been captured by the regular expression. But two matches are of course recommended (and likely to work better, as well).

	   You can use more complicated regular expressions if commit messages are likely to format ticket numbers in various ways. For example,
	   this regular expression:

	     [?s*(Tickets*#s*(d+))s*]?'

	   Will match:

	      String Matched	       Link Text	Ticket Number
	     --------------------|--------------------|---------------
	      [Ticket#1234]	    [Ticket#1234]	1234
	      [ Ticket # 1234 ]     [ Ticket # 1234 ]	1234
	      Ticket #1234	    Ticket #1234	1234
	      Ticket # 1234	    Ticket  #1234	1234

	   In any of these cases, you can see that the match is successful, properly creates the link text (simply using the text as typed in by
	   the committer, and correctly extracts the ticket number for use in the URL.

	   To learn more about the power of Regular expressions, I highly recommend _Mastering Regular Expressions, Second Edition_, by Jeffrey
	   Friedl.

       wrap_log
	     svnnotify --wrap-log

	   A boolean attribute to specify whether or not to wrap the log message in the output HTML. By default, log messages are not wrapped, on
	   the assumption that they should appear exactly as typed. But if that's not the case, specify this option to wrap the log message.

   Class Methods
       content_type

       Returns the content type of the notification message, "text/html". Used to set the Content-Type header for the message.

Instance Interface
   Instance Methods
       start_html

	 $notifier->start_html($file_handle);

       This method starts the HTML of the notification message. It outputs the opening "<html>", "<head>", and "<body>" tags. Note that if the
       "language" attribute is set to a value, it will be specified in the
	"<html>" tag.

       All of the HTML will be passed to any "start_html" output filters. See Writing Output Filters for details on filters.

       start_body

       This method starts the body of the HTML notification message. It first calls "start_html()", and then outputs the "<style>" tag, calling
       "output_css()" between them. It then outputs an opening "<div>" tag.

       If the "header" attribute is set, "start_body()" outputs it between "<div>" tags with the ID "header". Furthermore, if the header happens
       to start with the character "<", "start_body()" assumes that it contains valid HTML and therefore will not escape it.

       If a "start_body" output filter has been specified, it will be passed the lines with the "<div>" tag and the header. To filter the CSS, use
       a "css" filter, and to filter the declaration of the HTML document and its "<head>" section, use a "start_html" filter. See Writing Output
       Filters for details on filters.

       output_css

	 $notifier->output_css($file_handle);

       This method starts outputs the CSS for the HTML message. It is called by "start_body()", and which wraps the output of "output_css()" in
       the appropriate "<style>" tags.

       An output filter named "css" may be added to modify the output of CSS. The filter subroutine name should be "css" and expect an array
       reference of lines of CSS. See Writing Output Filters for details on filters.

       output_metadata

	 $notifier->output_metadata($file_handle);

       This method outputs a definition list containing the meta data of the commit, including the revision number, author (user), and date of the
       revision. If the "revision_url" attribute has been set, then the appropriate URL for the revision will be used to turn the revision number
       into a link.

       If there are any "log_message" filters, this method will do no HTML formatting, but redispatch to SVN::Notify::output_metadata. See Writing
       Output Filters for details on filters.

       output_log_message

	 $notifier->output_log_message($file_handle);

       Outputs the commit log message in "<pre>" tags, and the label "Log Message" in "<h3>" tags. If the "bugzilla_url" attribute is set, then
       any strings like "Bug 2" or "bug # 567" will be turned into links.

       If there are any "log_message" filters, the filters will be assumed to escape the HTML, create inline links, and link ticket URLs.
       Otherwise, this method will do those things. See Writing Output Filters for details on filters.

       output_file_lists

	 $notifier->output_log_message($file_handle);

       Outputs the lists of modified, added, deleted, files, as well as the list of files for which properties were changed as unordered lists.
       The labels used for each group are pulled in from the "file_label_map()" class method and output in "<h3>" tags.

       If there are any "file_lists" filters, this method will do no HTML formatting, but redispatch to SVN::Notify::output_file_lists. See
       Writing Output Filters for details on filters.

       end_body

	 $notifier->end_body($file_handle);

       Closes out the body of the email by outputting the closing "</body>" and "</html>" tags. Designed to be called when the body of the message
       is complete, and before any call to "output_attached_diff()".

       If the "footer" attribute is set, "end_body()" outputs it between "<div>" tags with the ID "footer". Furthermore, if the footer happens to
       end with the character "<", "end_body()" assumes that it contains valid HTML and therefore will not escape it.

       All of the HTML will be passed to any "end_body" output filters. See Writing Output Filters for details on filters.

       output_diff

	 $notifier->output_diff($out_file_handle, $diff_file_handle);

       Sends the output of "svnlook diff" to the specified file handle for inclusion in the notification message. The diff is output between
       "<pre>" tags, and Each line of the diff file is escaped by "HTML::Entities::encode_entities()".	The diff data will be read from
       $diff_file_handle and printed to $out_file_handle.

       If there are any "diff" filters, this method will do no HTML formatting, but redispatch to SVN::Notify::output_diff. See Writing Output
       Filters for details on filters.

   Accessors
       In addition to those supported by SVN::Notify, SVN::Notify::HTML supports the following accessors:

       linkize

	 my $linkize = $notifier->linkize;
	 $notifier = $notifier->linkize($linkize);

       Gets or sets the value of the "linkize" attribute.

       css_url

	 my $css_url = $notifier->css_url;
	 $notifier = $notifier->css_url($css_url);

       Gets or sets the value of the "css_url" attribute.

See Also
       SVN::Notify

Author
       David E. Wheeler <david@kineticode.com>

Copyright and License
       Copyright (c) 2004-2009 Kineticode, Inc. Some Rights Reserved.

       This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

perl v5.10.1							    2011-03-15						    SVN::Notify::HTML(3pm)
All times are GMT -4. The time now is 09:50 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy