Using txr to extract information from output


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Using txr to extract information from output
# 1  
Old 02-17-2010
Using txr to extract information from output

am using txr command (txr 1097) on a process that generates the following output. Im trying to extract the 13th field from the highlighted string. it is delimited by '?'. The 13th field corresponds to the '0' (in bold). can you let me know how I can extract the 13 th field please?



Searching /live/midware/AL2/trace/trace.170210 for EDR=1097 any USER

1097 req 12:07:50 qid=30 pid=62 hdr=[ IVR~~11 IVR1001 02] F176!ACCNO/xxxxxxxxxxxxxx !ROLECDCNT/00000!PRDHLDRLCD/000!C.MORE/00000!LSTOCISPTY/0 !LSTPRDRLCD/0 !LSTPRODID/0 !LSTAMDEFDT/00000000!
1097 res 12:07:51 qid=23 0??0?2?163002?Channel Outlet Id invalid??0?????0???????????????????????????????????????0?????~


1097 req 12:19:35 qid=30 pid=62 hdr=[ IVR~~11 IVR1003 02] F176!ACCNO/xxxxxxxxxxxxxx !ROLECDCNT/00000!PRDHLDRLCD/000!C.MORE/00000!LSTOCISPTY/0 !LSTPRDRLCD/0 !LSTPRODID/0 !LSTAMDEFDT/00000000!
1097 res 12:19:35 qid=23 0??0?2?163002?Channel Outlet Id invalid??0?????0???????????????????????????????????????0?????~



Searched /live/midware/AL2/trace/trace.170210 for EDR 1097 any USER (31 lines)
2 requests
2 responses
# 2  
Old 02-17-2010
Hi.

1) The txr command is not standard, so few people here probably will have had experience with it.

2) What have you tried so far -- what does your query look like?

3) Note that such tasks are easily done with awk and other commands.

4) Please use code tags around data and code: select the text and click the # above the editing box.

Best wishes ... cheers, drl
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Extract information from file

In a particular directory, there can be 1000 files like below. filename is job901.ksh #!/bin/ksh cront -x << EOJ submit file=$PRODPATH/scripts/genReport.sh maxdelay=30 &node=xnode01 tname=job901 &pfile1=/prod/mldata/data/test1.dat ... (17 Replies)
Discussion started by: vedanta
17 Replies

2. Shell Programming and Scripting

Extract information from file

Gents, If is possible please help. I have a big file (example attached) which contends exactly same value in column, but from column 2 to 6 these values are diff. I will like to compile for all records all columns like the example attached in .csv format (output.rar ).. The last column in the... (11 Replies)
Discussion started by: jiam912
11 Replies

3. Shell Programming and Scripting

Extract information from txt file

Hello! I need help :) I have a file like this: AA BC FG RF TT GH DD FF HH (a few number of rows and three columns) and I want to put the letters of each column in a variable step by step in order to give them as input in another script. So I would like to obtain: for the 1° loop:... (11 Replies)
Discussion started by: edekP
11 Replies

4. Shell Programming and Scripting

Extract Specific Information from a particular field

Hi, I am trying to extract a specific information from a file which contains more than 200 million records. Attached the input file for your reference. My file contains information below ... (4 Replies)
Discussion started by: rramkrishnas
4 Replies

5. Shell Programming and Scripting

How to extract specific information?

hi, i have a file A like this: ******************* No 2823 ******************** contig15205- G383C4U02H4G80+ is in contig15205- G383C4U02HGLXM- is in contig15205- G383C4U01C3HIZ+ is in contig15205- ... (3 Replies)
Discussion started by: the_simpsons
3 Replies

6. Shell Programming and Scripting

How to extract information from a file?

Hi, i have a file like this: <Iteration> <Iteration_iter-num>3</Iteration_iter-num> <Iteration_query-ID>lcl|3_0</Iteration_query-ID> <Iteration_query-def>G383C4U01EQA0A length=197</Iteration_query-def> <Iteration_query-len>197</Iteration_query-len> ... (9 Replies)
Discussion started by: the_simpsons
9 Replies

7. UNIX for Dummies Questions & Answers

Write a script to extract information from a db

Hi I need to put together a script that will search certain tables in a db and send that data to a csv file. Basically I am importing data to a db and I want to write a script to check that all information was imported correctly. Thank you (1 Reply)
Discussion started by: ladyAnne
1 Replies

8. UNIX for Advanced & Expert Users

using txr to extract information from output

am using txr command (txr 1097) on a process that generates the following output. Im trying to extract the 13th field from the highlighted string. it is delimited by '?'. The 13th field corresponds to the '0' (in bold). can you let me know how I can extract the 13 th field please? ... (1 Reply)
Discussion started by: pazman
1 Replies

9. Shell Programming and Scripting

AWK to extract information

Hi all, I am working on a shell script to extract information from a file that has output from Oracle sqlplus. The problem is that the output of a single line is spread across multiple lines and i do not know as how to extract the particular filed at ones,which spans multiple lines.... (2 Replies)
Discussion started by: harris2107
2 Replies

10. Shell Programming and Scripting

How do you extract the information from a library?

hi all, i am quite new with Perl (just 1 week of experience) and i am suppose to understand the usage of library, which i can't, anyway... i came across this library...i think from the linux redhat redhat.linux.lib.pl, there are a couple of functions there that can be used to retrieve information... (3 Replies)
Discussion started by: mercz
3 Replies
Login or Register to Ask a Question