Search String and extract few lines under the searched string
Need Assistance in shell programming... I have a huge file which has multiple stations and i wanted to search particular station and extract few lines from it and the rest is not needed
Bold letters are the stations . The whole file has multiple stations .
Below example i wanted to search KSZ063 and get the below 6 lines to it.
Hi All,
My requisite is to search for the string "0108"(which is the year and has come in the wrong year format) in a particular column say 4th column in a tab delimited file and then replace it with 2008(the correct year format) in the same position where 0108 was found..The issue is the last... (15 Replies)
Hi, guys. I have one question:
I need to search for a string in a file, and then extract another string from the file and assign it to a variable.
For example:
the contents of the file (group) is below:
...
ftp:x:23:
mail:x:34
...
testing:x:2001
sales:x:2002
development:x:2003
...... (6 Replies)
Hi All,
My requisite is to search for the string "0108"(which is the year and has come in the wrong year format) in a particular column say 4th column in a tab delimited file and then replace it with 2008(the correct year format) in the same position where 0108 was found in the same file..The... (27 Replies)
hi all!
i have a working that looks like this...
file1
MALE JOHN
MALE ANJO
FEMALE ANNE
MALE JAMES
FEMALE HONEY
FEMALE IZA
what i want to do is insert "M" when the first string is "MALE" and insert "F" when the first string is "FEMALE".
file1
M MALE ... (10 Replies)
Hi Guys,
I am trying to write a perl script to search a string "Name" in the file "FILE" and also want to create a new file and push the searched string Name line along with 10 lines following the same.
can anyone of you please let me know how to go about it ? (8 Replies)
What's the easiest way to search a file for a specific string and then look for other instances after that? I want to search for all Virtual Hosts and print out the Server Name and Document Root (if it has that info), while discarding the rest of the info.
Basically my file looks like this:
...... (6 Replies)
Hi,
I need to replace and append a string in a text if grep is true. For eg:
grep ABC test.txt | grep -v '\.$' | awk {'print $4'} | sed "s/ ?
How do I replace all instances of "print $4" using sed with another sring? Eg of the string returned will be,
lx123
web222
xyz
Want to... (8 Replies)
I need to search this "<CardinalMPI>" string and replace the same string above two lines of the string.
Nov 16, 2012 12:58:34 PM
INFO: Centinel LookUp ResponseXML : <CardinalMPI>
<ReasonCode></ReasonCode>
<ErrorDesc></ErrorDesc>
<MerchantReferenceNumber></MerchantReferenceNumber>... (4 Replies)
I need to search the file using strings "Request Type" , " Request Method" , "Response Type" and by using result set find the xml tags and convert into a single line?. below are the scenarios.
Cat test
Nov 10, 2012 5:17:53 AM
INFO: Request Type
Line 1.... (5 Replies)
Hi Team
I have an huge xml where i need to search for a ceratin numbers. For example
2014-05-06 15:15:41,498 INFO WebContainer : 10 CommonServicesLogs - CleansingTriggerService.invokeCleansingService Entered PUBSUB NOTIFY MESSAGE () -
<?xml version="1.0" encoding="UTF-8"... (5 Replies)
Discussion started by: Kannannair
5 Replies
LEARN ABOUT DEBIAN
rt::client::rest::group
RT::Client::REST::Group(3pm) User Contributed Perl Documentation RT::Client::REST::Group(3pm)NAME
RT::Client::REST::Group -- group object representation.
SYNOPSIS
my $rt = RT::Client::REST->new(server => $ENV{RTSERVER});
my $group = RT::Client::REST::Group->new(
rt => $rt,
id => $id,
)->retrieve;
DESCRIPTION
RT::Client::REST::Group is based on RT::Client::REST::Object. The representation allows one to retrieve, edit, and create groups in RT.
Note: RT currently does not allow REST client to search groups.
ATTRIBUTES
id
For retrieval, you can specify either the numeric ID of the group or his group name. After the retrieval, however, this attribute will
be set to the numeric id.
name
Name of the group
description
Description
members
List of the members of this group.
DB METHODS
For full explanation of these, please see "DB METHODS" in RT::Client::REST::Object documentation.
retrieve
Retrieve RT group from database.
store
Create or update the group.
search
Currently RT does not allow REST clients to search groups.
INTERNAL METHODS
rt_type
Returns 'group'.
SEE ALSO
RT::Client::REST, RT::Client::REST::Object, RT::Client::REST::SearchResult.
AUTHOR
Miquel Ruiz <mruiz@cpan.org>
LICENSE
Perl license with the exception of RT::Client::REST, which is GPLed.
perl v5.14.2 2012-01-20 RT::Client::REST::Group(3pm)