In a nutshell, I need to work out how to return the last matching pattern from an awk //,// search. I can bring back the first, but am unsure how to obtain the last, and a simple tail won't work as the match could be over multiple lines.
Secondly I would like some way of pattern matching, a... (10 Replies)
Hi,
I am trying to replace a specific column values in a csv file with double quotes.
Example:
SNO,NAME,ZIPCODE,RANK,CARE_OF
1,Robert,74538,12,RICHARD JOHNSON, P.C
2,Sam,07564,13,% R.S MIKE, V.K.S
3,Kim, Ed,12345,14,@90 KMS, %TK
Desired Output:
SNO,NAME,ZIPCODE,RANK,CARE_OF... (1 Reply)
Dear Team,
How do we match two patterns on the same line using awk?Are there any logical operators which i could use in awk like awk '\gokul && chennai\' <filename>
Eg:
Input file:
gokul,10/11/1986,coimbatore.
gokul,10/11/1986,bangalore.
gokul,12/04/2008,chennai.... (2 Replies)
Hi,
How can I tell awk to print all lines/columns if column number 5 contains the word Monday?
I have tried
nawk -F, '$5==Monday' OFS=, myfile > outputfile
but that doesn't work (I am a newb!!)
Thanks, (7 Replies)
Hello all,
I have written a perl script which searched for a file in a folder, and return the value found or not found.
The file that we are getting is a weekly file and everyweek, the date changes.
So for this i have written a file pattern matching script, but i am not getting the... (4 Replies)
Hello all,
I am trying to sort thru a database and print all the customers whose first names are only four characters. I just want to pull the first name only from the database.
the database records appear like this in file:
Mike Harrington:(510) 548-1278:250:100:175; first is name Mike... (4 Replies)
i have 2 strings with values below which are read from a file
1 ---> end
2 ---> string(1)newline="\n";
which need to be compared inside an if block as below
if \\n\"\;" ]
then
echo "pattern match"
fi
but the above code is not working (1 Reply)
can somebody provide me with some ksh code that will return true if my the contents in my variable match anyone of these strings ORA|ERROR|SP2
variable="Error:ORA-01017: Invalid username/password; logon denied\nSP2-0640:Not connected"
I tried this and it does not seem to work for me
... (3 Replies)
Hi All
I am having one awk and sed requirement for the below problem.
I tried multiple options in my sed or awk and right output is not coming out.
Problem Description
###############################################################
I am having a big file say file having repeated... (4 Replies)
Hi
I need to do a patten match between files .
I am new to shell scripting and have come up with this so far. It take 50 seconds to process files of 2mb size . I need to tune this code as file size will be around 50mb and need to save time.
Main issue is that I need to search the pattern from... (2 Replies)
Discussion started by: nitin_daharwal
2 Replies
LEARN ABOUT CENTOS
ppi::token::end
PPI::Token::End(3) User Contributed Perl Documentation PPI::Token::End(3)NAME
PPI::Token::End - Completely useless content after the __END__ tag
INHERITANCE
PPI::Token::End
isa PPI::Token
isa PPI::Element
DESCRIPTION
If you've read PPI::Token::Whitespace, you should understand by now the concept of documents "floating in a sea of PPI::Token::Whitespace".
Well it doesn't after the __END__ tag.
Once you __END__, it's all over. Anything after that tag isn't even fit to be called whitespace. It just simply doesn't exist as far as
perl (the interpreter) is concerned.
That's not to say there isn't useful content. Most often people use the __END__ tag to hide POD content, so that perl never has to see it,
and presumably providing some small speed up.
That's fine. PPI likes POD. Any POD after the __END__ tag is parsed into valid PPI::Token::Pod tags as normal. This class, on the other
hand, is for "what's after __END__ when it isn't POD".
Basically, the completely worthless bits of the file :)
METHODS
This class has no method beyond what is provided by its PPI::Token and PPI::Element parent classes.
SUPPORT
See the support section in the main module.
AUTHOR
Adam Kennedy <adamk@cpan.org>
COPYRIGHT
Copyright 2001 - 2011 Adam Kennedy.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The full text of the license can be found in the LICENSE file included with this module.
perl v5.16.3 2011-02-26 PPI::Token::End(3)