Sponsored Content
Top Forums Shell Programming and Scripting Find a pattern and print next all character to next space Post 302415293 by bakunin on Thursday 22nd of April 2010 07:27:53 AM
Old 04-22-2010
The command i wrote would have worked on the text you provided as example, at least it works here. If this is not the case on your side please provide a sample of your text and some version information about your system (OS, version, ...)

bakunin
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to print range of lines using sed when pattern has special character "["

Hi, My input has much more lines, but few of them are below pin(IDF) { direction : input; drc_pinsigtype : signal; pin(SELDIV6) { direction : input; drc_pinsigtype : ... (3 Replies)
Discussion started by: nehashine
3 Replies

2. Shell Programming and Scripting

Print characters till the next space when the pattern is found

i have a file which contains alphanumeric data in every line. what i need is the data after certain pattern. the data after the pattern is not of fixed length so i need the data till the space after the pattern. Input file: bfdkasfbdfg khffkf lkdhfhdf pattern (datarequired data not required)... (2 Replies)
Discussion started by: gpk_newbie
2 Replies

3. Shell Programming and Scripting

Find pattern in file and print

Hello, I want to read a CSV file and look for a pattern on each line. If the pattern is found I want to read another portion/column of that line and print that. Can somebody help me in writing it in CSH? E.g. CSV file has following lines, 1,Elephant,500kg,,,,, 2,Tiger,50kg,,,,,... (4 Replies)
Discussion started by: deshiashish
4 Replies

4. Shell Programming and Scripting

Print pattern regardless of space between

I have this content in file sshd : ALL : allow SSHD : all : ALLOW sshD : All : AllOW What I need is to print the occurrence of "sshd:all" regardless of the spaces between them and if lower/upper case. So all lines should be printed in output when "grepped" or "printed... (3 Replies)
Discussion started by: anil510
3 Replies

5. Shell Programming and Scripting

Print character after pattern found

Hi Gurus, i need your help to create a script the will print a characters after the pattern was found. Sample lines are below: My birthday:"1977-16-07", My birthday:"1975-16-07" My birthday:"1970-16-07". My patter should be "birthday:", then i want to print the following characters which... (18 Replies)
Discussion started by: scripter123
18 Replies

6. Shell Programming and Scripting

Gawk Find Pattern Print Lines Before and After

Using grep I can easily use: cvs log |grep -iB 10 -A 10 'date: 2013-10-30' to display search results and 10 lines before and after. How can this be accompished using gawk? (4 Replies)
Discussion started by: metallica1973
4 Replies

7. Shell Programming and Scripting

Find key pattern and print selected lines for each record

Hi, I need help on a complicated file that I am working on. I wanted to extract important info from a very huge file. It is space delimited file. I have hundred thousands of records in this file. An example content of the inputfile as below:- ## ID Ser402 Old; 23... (2 Replies)
Discussion started by: redse171
2 Replies

8. Shell Programming and Scripting

sed -- Find pattern -- print remainder -- plus lines up to pattern -- Minus pattern

The intended result should be : PDF converters 'empty line' gpdftext and pdftotext?xml version="1.0"?> xml:space="preserve"><note-content version="0.1" xmlns:/tomboy/link" xmlns:size="http://beatniksoftware.com/tomboy/size">PDF converters gpdftext and pdftotext</note-content>... (9 Replies)
Discussion started by: Klasform
9 Replies

9. Post Here to Contact Site Administrators and Moderators

Search for a pattern and replace a space at specific position with a Character in File

In file, we have millions of records each of 1000 in length. And at specific position say 800 there is a space, we need to replace it with Character X if the ID in that row starts with 123. So far i have used the below which is replacing space at that position to X but its not checking for... (3 Replies)
Discussion started by: Jagmeet Singh
3 Replies

10. UNIX for Beginners Questions & Answers

Find matched pattern and print all based on certain conditions

Hi, I am trying to extract data based on certain conditions. My sample input file as below:- lnc-2:1 OnePiece tra_law 500 688 1 . . g_id "R792.8417"# tra_law_id "R792.8417.1"# g_line "2.711647"# KM "8.723820"# lnc-2:1 OnePiece room 500 510 1 . . g_id "R792.8417"# tra_law_id "R792.8417.1"#... (7 Replies)
Discussion started by: bunny_merah19
7 Replies
Template::Plugin::GD(3pm)				User Contributed Perl Documentation				 Template::Plugin::GD(3pm)

NAME
Template::Plugin::GD - GD plugin(s) for the Template Toolkit SYNOPSIS
[% USE GD; # create an image img = GD.image(width, height) # allocate some colors black = img.colorAllocate(0, 0, 0); red = img.colorAllocate(255, 0, 0); blue = img.colorAllocate(0, 0, 255); # draw a blue oval img.arc(50, 50, 95, 75, 0, 360, blue); # fill it with red img.fill(50, 50, red); # output binary image in PNG format img.png | redirect('example.png'); %] DESCRIPTION
The Template-GD distribution provides a number of Template Toolkit plugin modules to interface with Lincoln Stein's GD modules. These in turn provide an interface to Thomas Boutell's GD graphics library. These plugins were distributed as part of the Template Toolkit until version 2.15 released in February 2006. At this time they were extracted into this separate distribution. For general information on the Template Toolkit see the documentation for the Template module or <http://template-toolkit.org>. For infor- mation on using plugins, see Template::Plugins and "USE" in Template::Manual::Directives. METHODS
The GD plugin module provides a number of methods to create various other GD objects. But first you need to load the GD plugin. [% USE GD %] Then you can call the following objects against it. image(width, height) Creates a new GD::Image object. [% image = GD.image(100, 200) %] polygon() Creates a new GD::Polygon object. [% poly = GD.polygon; poly.addPt(50,0); poly.addPt(99,99); poly.addPt(0,99); image.filledPolygon(poly, blue); %] text() Creates a new GD::Text object. [% text = GD.text; text.set_text('Some text'); %] GD PLUGINS
These are the GD plugins provided in this distribution. Template::Plugin::GD Front-end module to the GD plugin collection. Template::Plugin::GD::Image Plugin interface providing direct access to the GD::Image module. [% USE image = GD.Image %] Template::Plugin::GD::Polygon Plugin interface providing direct access to the GD::Polygon module. [% USE poly = GD.Polygon; poly.addPt(50,0); poly.addPt(99,99); poly.addPt(0,99); image.filledPolygon(poly, blue); %] Template::Plugin::GD::Text Plugin interface providing direct access to the GD::Text module. [% USE text = GD.Text; text.set_text('Some text'); %] Template::Plugin::GD::Text::Align Plugin interface to the GD::Text::Align module for creating aligned text. Template::Plugin::GD::Text::Wrap Plugin interface to the GD::Text::Wrap module for creating wrapped text. Template::Plugin::GD::Graph::area Plugin interface to the GD::Graph::area module for creating area graphics with axes and legends. Template::Plugin::GD::Graph::bars3d Plugin interface to the GD::Graph::bars3d module for creating 3D bar graphs with axes and legends. Template::Plugin::GD::Graph::bars Plugin interface to the GD::Graph::bars module for creating bar graphs with axes and legends. Template::Plugin::GD::Graph::lines3d Plugin interface to the GD::Graph::lines3d module for creating 3D line graphs with axes and legends. Template::Plugin::GD::Graph::lines Plugin interface to the GD::Graph::lines module for creating line graphs with axes and legends. Template::Plugin::GD::Graph::linespoints Plugin interface to the GD::Graph::linespoints module for creating line/point graphs with axes and legends Template::Plugin::GD::Graph::mixed Plugin interface to the GD::Graph::mixed module for creating mixed graphs with axes and legends. Template::Plugin::GD::Graph::pie3d Plugin interface to the GD::Graph::pie3d module for creating 3D pie charts with legends. Template::Plugin::GD::Graph::pie Plugin interface to the GD::Graph::pie module for creating pie charts with legends. Template::Plugin::GD::Graph::points Plugin interface to the GD::Graph::points module for creating point graphs with axes and legends Template::Plugin::GD::Constants Provides access to various GD constants. [% USE gdc = GD.Constants; font = gdc.gdLargeFont %] AUTHORS
Thomas Boutell wrote the GD graphics library. Lincoln D. Stein wrote the Perl GD modules and Martien Verbruggen wrote the GD::Text and GD::Graph modules that interface with it. Craig Barratt wrote the GD plugins for the Template Toolkit. Andy Wardley wrote the Template Toolkit. Larry wrote Perl. Brian and Dennis wrote C. Dennis and Ken wrote Unix. VERSION
This is version 2.66 of the Template::Plugin::GD module set. COPYRIGHT
Copyright (C) 2001 Craig Barratt, 2006 Andy Wardley. This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. SEE ALSO
Template, Template::Plugins, GD perl v5.8.8 2008-03-01 Template::Plugin::GD(3pm)
All times are GMT -4. The time now is 10:01 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy