01-06-2011
Thanks Anurag for the quick response. Unfortunately I can't post sample input but here is the scenario
Starting line (for tx - 1)
Transaction ID (Unique for each transaction)
End line (for tx -1)
starting line (for tx -2)
Transaction ID
End line (for tx -2)
.....
.....
starting line (for tx -10)
Transaction ID
End line (for tx -10)
The start/end lines are common for all the transactions. The transaction ID is present as part of the line in the middle of the respective transaction log.
Now, I have to write a script so that it can pull the requested transaction log (from starting line to end line) by searching the transaction ID from the log into a seperate file.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I have one file:
123*100*abcd*10
123*101*abcd*-29*def
123*100*abcd*-10
123*102*abcd*-105*asd
I would like to parameterize the search patterns in the following way so that the user could dynamically change the search pattern.
*100* and *- (ie *minus)
*102* and *-
The output that is... (6 Replies)
Discussion started by: augustinep
6 Replies
2. Shell Programming and Scripting
Good day, great gurus,
I'm new to Perl, and programming in general. I'm trying to retrieve a column of data from my text file which spans a non-specific number of lines. So I did a regexp that will pick out the columns. However,my pattern would vary. I tried using a foreach loop unsuccessfully.... (2 Replies)
Discussion started by: Sp3ck
2 Replies
3. Shell Programming and Scripting
Hi
I am trying to retrieve values from a tab-delimited file.I am using
while read record
value=`echo $record | cut -f12`
done
Where 12 is the column no i want retieve and record is one line of the file.
But it is returning the full record.
Plz help (4 Replies)
Discussion started by: akashtcs
4 Replies
4. Shell Programming and Scripting
hello
i have two files
temp.txt
and temp_unique.text
the second file consists the unique fields from the temp.txt file
the strings stored are in the following form
4,4
17,12
15,65
4,4
14,41
15,65
65,89
1254,1298i'm able to run the following script to get the total count of a... (3 Replies)
Discussion started by: vaibhavkorde
3 Replies
5. Shell Programming and Scripting
Hi,
I am new to shell scripting and is working on a script to extract lines from a log file between two time stamps using awk command. After some research I used following command:
awk '/01 Oct 2011/{p=1} /10 Oct 2011/{p=0} p' test.log >> tmp.log
This works fine. But now i want to... (3 Replies)
Discussion started by: davidtd
3 Replies
6. Shell Programming and Scripting
Hi,
I tried to search multiple pattern using awk
trans=1234
reason=LN MISMATCH
rec=`awk '/$trans/ && /'"$reason"'/' file`
whenevr i tried to run on command promt it is executing but when i tried to implment same logic in shell script,it is failing i.e $rec is empty
... (6 Replies)
Discussion started by: ns64110
6 Replies
7. Shell Programming and Scripting
Hi,
I have a file content as below.
Table : PAYR
Displayed fields: 15 of 15 Fixed columns: 4 List width 0999... (4 Replies)
Discussion started by: shirdi
4 Replies
8. Shell Programming and Scripting
Hi Guys,
Need your urgent support please. I have a file with 3 separate strings separated by a comma and 2nd file which has a sentence where I can find these 3 strings. I need to find sentences which do not have these strings and maybe redirect it to a 3rd file.
All the 3 strings will occur... (3 Replies)
Discussion started by: danish0909
3 Replies
9. Shell Programming and Scripting
I have two files:
file 1:
hello.com neo.com,japan.com,example.com
news.net xyz.com, telecom.net, highlands.net, software.com
example2.com earth.net, abc.gov.uk
file 2:
neo.com
example.com
abc.gov.uk
file 2 are the search keys to search in file 1 if any of the search... (7 Replies)
Discussion started by: csim_mohan
7 Replies
10. Shell Programming and Scripting
I would like to grep for aaa and bbb and ccc from one line in file1.txt in any order on a line on file2.txt
file1.txt
aaa bbb ccc
ddd fff ggg
hhh ddd jjj
jjj cccfile2.txt
aaa bbb ccc ddd fff ggg --> output whole line since it matches with aaa bbb ccc of file1.txt
aaa ddd jjj hhh --> no... (1 Reply)
Discussion started by: sdf
1 Replies
LEARN ABOUT DEBIAN
rt::client::rest::transaction
RT::Client::REST::Transaction(3pm) User Contributed Perl Documentation RT::Client::REST::Transaction(3pm)
NAME
RT::Client::REST::Transaction -- this object represents a transaction.
SYNOPSIS
my $transactions = $ticket->transactions;
my $count = $transactions->count;
print "There are $count transactions.
";
my $iterator = $transactions->get_iterator;
while (my $tr = &$iterator) {
print "Id: ", $tr->id, "; Type: ", $tr->type, "
";
}
DESCRIPTION
A transaction is a second-class citizen, as it does not exist (at least from the current REST protocol implementation) by itself. At the
moment, it is always associated with a ticket (see parent_id attribute). Thus, you will rarely retrieve a transaction by itself; instead,
you should use "transactions()" method of RT::Client::REST::Ticket object to get an iterator for all (or some) transactions for that
ticket.
ATTRIBUTES
id
Numeric ID of the transaction.
creator
Username of the user who created the transaction.
parent_id
Numeric ID of the object the transaction is associated with.
type
Type of the transactions. Please referer to RT::Client::REST documentation for the list of transaction types you can expect this field
to contain. Note that there may be some transaction types not (dis)covered yet.
old_value
Old value.
new_value
New value.
field
Name of the field the transaction is describing (if any).
attachments
I have never seen it set to anything yet. (I will some day investigate this).
created
Time when the transaction was created.
content
Actual content of the transaction.
description
Human-readable description of the transaction as provided by RT.
data
Not sure what this is yet.
METHODS
RT::Client::REST::Transaction is a read-only object, so you cannot "store()" it. Also, because it is a second-class citizen, you cannot
"search()" or "count()" it -- use "transactions()" method provided by RT::Client::REST::Ticket.
retrieve
To retrieve a transaction, attributes id and parent_id must be set.
INTERNAL METHODS
rt_type
Returns 'transaction'.
SEE ALSO
RT::Client::REST, RT::Client::REST::Ticket, RT::Client::REST::SearchResult.
AUTHOR
Dmitri Tikhonov <dtikhonov@yahoo.com>
LICENSE
Perl license with the exception of RT::Client::REST, which is GPLed.
perl v5.14.2 2011-12-27 RT::Client::REST::Transaction(3pm)