I have a file with many lines which contain strings like [46ms] [986976ms] .. etc.
But with no rule regarding field separators or anything else.
I want to print ONLY THE STRING from each line , not the entire line !!!
For example from the lines :
I want to have the output :
Or even better only the numbers from each of these strings. I want it with awk because I need speed, I have very big files to work with.
Hi,
I know how to use awk to search some expressions like five consecutive numbers, , this is easy.
However, how do I make awk print the pattern that is been matched?
For example:
input: usa,canada99292,japan222,france59664,egypt223
output:99292,59664 (6 Replies)
Hi,
I have a file filled with search strings which have a blank in between and look like this:
S. g. Ehr.
o. Jg.
v. d. Chijs
g. Ehr.
Now i would like to search for the strings and it also shall return the next column after the match.
awk -v FILE="search_strings.txt" 'BEGIN {... (10 Replies)
Hi AWK Experts,
Following is the data :
BRH113 DD AA HH CA DD DD AA HH BRH091 A4 A6 AH H7 67 HH J8 9J BRH0991 AA D8 C23 V5 H7 BR2 BRH991 AA HH GG5 BT0 JJ0
I want the output to be alligned with the pattern matching "BRH" inthe line.
The output should be look like:
A]... (4 Replies)
Data:
Pattern Data Data Data
Data Data Data
Data Data Data
...
With awk, how do I print the pattern matching line, then the subsequent lines following the pattern matching line. Varying number of lines following the pattern matching line. (9 Replies)
Hi experts , im new to Unix,AWK ,and im just not able to get this right.
I need to match for some patterns if it matches I need to print the next few words to it.. I have only three such conditions to match… But I need to print only those words that comes after satisfying the first condition..... (2 Replies)
Hi,
I have a simple problem but i guess stupid enough to figure it out. i have thousands rows of data. and i need to find match patterns of two columns and print the number of rows. for example:
inputfile
abd abp 123
abc abc 325
ndc ndc 451
mjk lkj... (3 Replies)
Hello Experts , require help . See below output:
File inputs
------------------------------------------
Server Host = mike
id rl images allocated last updated density
vimages expiration last read <------- STATUS ------->... (4 Replies)
I have two files and desire to use the strings from $1 of file 1 (file1.txt) as search criteria to find matches in $2 of file 2 (file2.txt). If matches are found I want to output the entire line of file 2 (file2.txt) followed by fields $2-$11 of file 1 (file1.txt). I can find the matches, I cannot... (7 Replies)
Discussion started by: jvoot
7 Replies
LEARN ABOUT DEBIAN
text::flow::wrap
Text::Flow::Wrap(3pm) User Contributed Perl Documentation Text::Flow::Wrap(3pm)NAME
Text::Flow::Wrap - Flexible word wrapping for not just ASCII output.
SYNOPSIS
use Text::Flow::Wrap;
# for regular ASCII usage ...
my $wrapper = Text::Flow::Wrap->new(
check_width => sub { length($_[0]) < 70 },
);
# for non-ASCII usage ...
my $wrapper = Text::Flow::Wrap->new(
check_width => sub { $pdf->get_text_width($_[0]) < 500 },
);
my $text = $wrapper->wrap($text);
DESCRIPTION
The main purpose of this module is to provide text wrapping features without being tied down to ASCII based output and fixed-width fonts.
My needs were for sophisticated test control in PDF and GIF output formats in particular.
METHODS
new (%params)
This constructs a new Text::Flow::Wrap module whose %params set the values of the attributes listed below.
wrap ($text)
This method will accept a bunch of text, it will then return a new string which is wrapped to the expected width.
Attribute Accessors
check_width (&code)
This attribute is required, and must be a CODE reference. This will be used to determine if the width of the text is appropriate. It
will get as an argument, a string which is should check the width of. It should return a Boolean value, true if the string is not
exceeded the max width and false if it has.
line_break ($str)
This is the line break character used when assembling and disassembling the text, it defaults to the newline character "
".
paragraph_boundry ($str)
This is the paragraph boundry marker used when disassembling the text, it defaults to the string "
".
paragraph_break ($str)
This is the paragraph breaker used when re-assembling the text, it defaults to the string "
".
word_boundry ($str)
This is the word boundry marker used when disassembling the text, it defaults to a single space character.
word_break ($str)
This is the paragraph breaker used when re-assembling the text, it defaults to a single space character.
Paragraph Disassembling
These methods deal with breaking up the paragraphs into its parts, which can then be processed through the re-assembling methods.
These methods are mostly used internally, but more sophisticated tools might need to access them as well (see Text::Flow).
disassemble_paragraph
disassemble_paragraphs
Paragraph Reassembling
These methods deal with putting the paragraph parts back together after the disassembling methods have done thier work.
These methods are mostly used internally, but more sophisticated tools might need to access them as well (see Text::Flow)
reassemble_paragraph
reassemble_paragraphs
Introspection
meta
Returns the Moose meta object associated with this class.
BUGS
All complex software has bugs lurking in it, and this module is no exception. If you find a bug please either email me, or add the bug to
cpan-RT.
AUTHOR
Stevan Little <stevan@iinteractive.com>
COPYRIGHT AND LICENSE
Copyright 2007 by Infinity Interactive, Inc.
<http://www.iinteractive.com>
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.10.1 2007-05-21 Text::Flow::Wrap(3pm)