need a text parser


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting need a text parser
# 8  
Old 07-30-2008
once again - not seeing your actual code is making it difficult to help!
Good luck!
# 9  
Old 07-30-2008
Quote:
Originally Posted by sfaizan
pealse read my first post. I want to change the data file created by a sofware to the simple one. by removing the left side of '=' and keeping the right side. one line per record to a new datafile. All are text files. I am using awk in bash with sed to remove the '=' and left side. but output in screen is ok, but in bash script if i try to use '>> newfilename' it adds '\' (back slash) at the end of each comma seperated field. I dont know may be its blank or empty space which is shown as '\' or something else.
We cannot and will not help you until you provide the exact text of the commands and scripts you are using. My code works and does not insert extraneous backslashes. Without seeing your code, we cannot know what you changed to make it not work.
# 10  
Old 07-31-2008
I am posting everything. I used awk to filter specific fields which i wanted from my bill data file and then write a new file with comma seperated values after the '=' sign, . I am able to do with this bash script but when i write a file using >> filename in script it give '\' as shown at the end. On the other hand if i dont use >> filename and display on screen it shows exactly as i wish. If there is any other way to do it plz help me.
----------------------
my script:
----------
#!/bin/bash
for file in $(ls -ld bill*);
do
{
if [[ "$file" == bill* ]]; then
{
gawk -F, '$21~/ELAPS/ && $21!~/ELAPSED-TIME=0/ { for (i=1;i<NF;i++) dataarr[ $1, ",", $2, ",", $5, ",", $6, ",", $9, ",", $10, ",", $13, ",", $14, ",", $15, ",", $16, ",", $18, ",", $19, ",", $21, ",", $23, ",", $24, ",", $25, ",", $26, ",", $33 ]++ }
END {
for ( words in dataarr )
print words
}
' $file | sed -e 's/[^,]*=//g' >> /usr/local/speech/billing/archive/$file

gawk -F, '$18~/ELAPS/ && $18!~/ELAPSED-TIME=0/ { for (i=1;i<NF;i++) dataarr[ $1, ",", $2, ",", "0", $4, ",", $6, ",", $7, ",", $10, ",", $11, ",", $12, ",", $13, ",", $15, ",", $16, ",", $18, ",", $20, ",", $21, ",", $22, ",", $23, ",", $30 ]++ }
END {
for ( words in dataarr )
print words
}
' $file | sed -e 's/[^,]*=//g' >> /usr/local/speech/billing/archive/$file
}
fi
};
done
-----------------------------------------------------------------------------------------------------------------------------------------------------
Datafile :
---------

Tue Apr 29 00:00:01 2003, HOST=172.20.100.10, DST-NUMBER-IN=3454#923442872628, DST-NUMBER-OUT=3454#923442872628, DST-NUMBER-BILL=3454#923442872628, SRC-IP=xxx.xxx.xxx.xxx:48371, DST-IP=172.20.100.104:1720, SRC-USER=xxx.xxx.xxx.xxx, SRC-NAME=SpeefFlow-Orig, DST-NAME=Term-Telnr-001, DIALPEER-NAME=Term-Telnr-SpeedFlow, INITIAL-INCOMING-LOCAL-ADDRESS=172.20.100.10, SELECTED-INCOMING-LOCAL-ADDRESS=172.20.100.10, RECORD-ID=1051552854-7274, ELAPSED-TIME=0, SETUP-TIME=00:00:01.000 +0500 Tue Apr 29 2003, CONNECT-TIME=00:00:01.000 +0500 Tue Apr 29 2003, DISCONNECT-TIME=00:00:01.000 +0500 Tue Apr 29 2003, DISCONNECT-CODE-LOCAL=136, DISCONNECT-CODE-Q931=34, SRC-BYTES-IN=187, DST-BYTES-IN=0, SRC-BYTES-OUT=0, DST-BYTES-OUT=0, QOS=0, CALLID=0229aed80664731d34380380b9fe5fad, CONFID=8154b51e36cc231f3c0380b9fe5fac75, PROXY-MODE=0, ROUTE-RETRIES=1, SCD-TIME=0, SOURCE-TUNNELLING=1, PDD-TIME=0, PDD-REASON=N/A
Tue Apr 29 00:00:01 2003, HOST=172.20.100.10, DST-NUMBER-IN=3454#923442872628, DST-NUMBER-OUT=3454#923442872628, DST-NUMBER-BILL=3454#923442872628, SRC-IP=xxx.xxx.xxx.xxx:48371, DST-IP=172.20.100.104:1720, SRC-USER=xxx.xxx.xxx.xxx, SRC-NAME=SpeefFlow-Orig, INITIAL-INCOMING-LOCAL-ADDRESS=172.20.100.10, SELECTED-INCOMING-LOCAL-ADDRESS=172.20.100.10, RECORD-ID=1051552854-7274, ELAPSED-TIME=0, SETUP-TIME=00:00:01.000 +0500 Tue Apr 29 2003, CONNECT-TIME=00:00:01.000 +0500 Tue Apr 29 2003, DISCONNECT-TIME=00:00:01.000 +0500 Tue Apr 29 2003, DISCONNECT-CODE-LOCAL=139, DISCONNECT-CODE-Q931=34, SRC-BYTES-IN=187, DST-BYTES-IN=0, SRC-BYTES-OUT=0, DST-BYTES-OUT=0, QOS=0, CALLID=0229aed80664731d34380380b9fe5fad, CONFID=8154b51e36cc231f3c0380b9fe5fac75, PROXY-MODE=0, ROUTE-RETRIES=2, SCD-TIME=0, SOURCE-TUNNELLING=1, PDD-TIME=0, PDD-REASON=N/A, LAST-CHECKED-DIALPEER=Term-Telnr-SpeedFlow
Tue Apr 29 00:00:01 2003, HOST=172.20.100.10, DST-NUMBER-IN=3454#923007653292, DST-NUMBER-OUT=3454#923007653292, DST-NUMBER-BILL=3454#923007653292, SRC-IP=xxx.xxx.xxx.xxx:33655, DST-IP=172.20.100.101:1720, SRC-USER=xxx.xxx.xxx.xxx, SRC-NAME=SpeefFlow-Orig, DST-NAME=Term-Mobi-001, DIALPEER-NAME=Term-Mobi-SpeedFlow, INITIAL-INCOMING-LOCAL-ADDRESS=172.20.100.10, SELECTED-INCOMING-LOCAL-ADDRESS=172.20.100.10, RECORD-ID=1051552854-7275, ELAPSED-TIME=0, SETUP-TIME=00:00:01.000 +0500 Tue Apr 29 2003, CONNECT-TIME=00:00:01.000 +0500 Tue Apr 29 2003, DISCONNECT-TIME=00:00:01.000 +0500 Tue Apr 29 2003, DISCONNECT-CODE-LOCAL=136, DISCONNECT-CODE-Q931=34, SRC-BYTES-IN=187, DST-BYTES-IN=0, SRC-BYTES-OUT=0, DST-BYTES-OUT=0, QOS=0, CALLID=0229aed806560a1b34360380b9fe5fad, CONFID=bc637ff8297c361f218293d0c9ceeffd, PROXY-MODE=0, ROUTE-RETRIES=1, SCD-TIME=0, SOURCE-TUNNELLING=1, PDD-TIME=0, PDD-REASON=N/A
Tue Apr 29 00:00:02 2003, HOST=172.20.100.10, SRC-NUMBER-IN=43443839, DST-NUMBER-IN=3454#923445823854, SRC-NUMBER-OUT=43443839, DST-NUMBER-OUT=3454#923445823854, SRC-NUMBER-BILL=43443839, DST-NUMBER-BILL=3454#923445823854, SRC-IP=xxx.xxx.xxx.xxx:58962, DST-IP=172.20.100.104:1720, SRC-RTP-IP=xxx.xxx.xxx.xxx:18684, SRC-USER=xxx.xxx.xxx.xxx, SRC-NAME=SpeefFlow-Orig, DST-NAME=Term-Telnr-001, DIALPEER-NAME=Term-Telnr-SpeedFlow, INITIAL-INCOMING-LOCAL-ADDRESS=172.20.100.10, SELECTED-INCOMING-LOCAL-ADDRESS=172.20.100.10, OUTGOING-LOCAL-ADDRESS=172.20.100.10, RECORD-ID=1051552854-7264, ELAPSED-TIME=0, SETUP-TIME=23:59:57.000 +0500 Mon Apr 28 2003, CONNECT-TIME=00:00:01.000 +0500 Tue Apr 29 2003, DISCONNECT-TIME=00:00:01.000 +0500 Tue Apr 29 2003, DISCONNECT-CODE-LOCAL=1, DISCONNECT-CODE-Q931=16, SRC-BYTES-IN=353, DST-BYTES-IN=122, SRC-BYTES-OUT=0, DST-BYTES-OUT=353, QOS=0, SRC-CODEC=g7231 g729 , CALLID=0229aed7ffd1cd1f33e80380b9fe5fad, CONFID=001e43aee121151f292a1bb891f6f765, LAR-FAULT-REASON=2, PROXY-MODE=0, ROUTE-RETRIES=1, SCD-TIME=4, SOURCE-FASTSTART=1, SOURCE-TUNNELLING=1, PDD-TIME=0, PDD-REASON=N/A
Tue Apr 29 00:00:02 2003, HOST=172.20.100.10, DST-NUMBER-IN=123#923465739668, DST-NUMBER-OUT=123#923465739668, DST-NUMBER-BILL=123#923465739668, SRC-IP=192.168.0.170:62723, DST-IP=172.20.100.104:1720, SRC-USER=192.168.0.170, SRC-NAME=SSSS-Tel, DST-NAME=Term-Telnr-001, DIALPEER-NAME=Term-Telnr-SSSS-Tel, INITIAL-INCOMING-LOCAL-ADDRESS=172.20.100.10, SELECTED-INCOMING-LOCAL-ADDRESS=172.20.100.10, RECORD-ID=1051552854-7277, ELAPSED-TIME=0, SETUP-TIME=00:00:02.000 +0500 Tue Apr 29 2003, CONNECT-TIME=00:00:02.000 +0500 Tue Apr 29 2003, DISCONNECT-TIME=00:00:02.000 +0500 Tue Apr 29 2003, DISCONNECT-CODE-LOCAL=136, DISCONNECT-CODE-Q931=34, SRC-BYTES-IN=188, DST-BYTES-IN=0, SRC-BYTES-OUT=0, DST-BYTES-OUT=0, QOS=0, CALLID=311984842ecd11d6bd3391ea99790924, CONFID=3118e85c2ecd11d6bd3191ea99790924, PROXY-MODE=0, ROUTE-RETRIES=1, SCD-TIME=0, SOURCE-TUNNELLING=1, PDD-TIME=0, PDD-REASON=N/A
Tue Apr 29 00:00:02 2003, HOST=172.20.100.10, DST-NUMBER-IN=123#923465739668, DST-NUMBER-OUT=123#923465739668, DST-NUMBER-BILL=123#923465739668, SRC-IP=192.168.0.170:62723, DST-IP=172.20.100.104:1720, SRC-USER=192.168.0.170, SRC-NAME=SSSS-Tel, INITIAL-INCOMING-LOCAL-ADDRESS=172.20.100.10, SELECTED-INCOMING-LOCAL-ADDRESS=172.20.100.10, RECORD-ID=1051552854-7277, ELAPSED-TIME=0, SETUP-TIME=00:00:02.000 +0500 Tue Apr 29 2003, CONNECT-TIME=00:00:02.000 +0500 Tue Apr 29 2003, DISCONNECT-TIME=00:00:02.000 +0500 Tue Apr 29 2003, DISCONNECT-CODE-LOCAL=139, DISCONNECT-CODE-Q931=34, SRC-BYTES-IN=188, DST-BYTES-IN=0, SRC-BYTES-OUT=0, DST-BYTES-OUT=0, QOS=0, CALLID=311984842ecd11d6bd3391ea99790924, CONFID=3118e85c2ecd11d6bd3191ea99790924, PROXY-MODE=0, ROUTE-RETRIES=2, SCD-TIME=0, SOURCE-TUNNELLING=1, PDD-TIME=0, PDD-REASON=N/A, LAST-CHECKED-DIALPEER=Term-Telnr-SSSS-Tel
Tue Apr 29 00:00:02 2003, HOST=172.20.100.10, SRC-NUMBER-IN=17184217697, DST-NUMBER-IN=3454#923445051657, SRC-NUMBER-OUT=17184217697, DST-NUMBER-OUT=3454#923445051657, SRC-NUMBER-BILL=17184217697, DST-NUMBER-BILL=3454#923445051657, SRC-IP=xxx.xxx.xxx.xxx:55742, DST-IP=172.20.100.104:1720, SRC-USER=xxx.xxx.xxx.xxx, SRC-NAME=SpeefFlow-Orig, DST-NAME=Term-Telnr-001, DIALPEER-NAME=Term-Telnr-SpeedFlow, INITIAL-INCOMING-LOCAL-ADDRESS=172.20.100.10, SELECTED-INCOMING-LOCAL-ADDRESS=172.20.100.10, RECORD-ID=1051552854-7280, ELAPSED-TIME=0, SETUP-TIME=00:00:02.000 +0500 Tue Apr 29 2003, CONNECT-TIME=00:00:02.000 +0500 Tue Apr 29 2003, DISCONNECT-TIME=00:00:02.000 +0500 Tue Apr 29 2003, DISCONNECT-CODE-LOCAL=136, DISCONNECT-CODE-Q931=34, SRC-BYTES-IN=209, DST-BYTES-IN=0, SRC-BYTES-OUT=0, DST-BYTES-OUT=0, QOS=0, CALLID=0229aed808cb711034580380b9fe5fad, CONFID=af996c3535cc231f3c0380b9fe5fac75, PROXY-MODE=0, ROUTE-RETRIES=1, SCD-TIME=0, SOURCE-TUNNELLING=1, PDD-TIME=0, PDD-REASON=N/A
Tue Apr 29 00:00:02 2003, HOST=172.20.100.10, SRC-NUMBER-IN=17184217697, DST-NUMBER-IN=3454#923445051657, SRC-NUMBER-OUT=17184217697, DST-NUMBER-OUT=3454#923445051657, SRC-NUMBER-BILL=17184217697, DST-NUMBER-BILL=3454#923445051657, SRC-IP=xxx.xxx.xxx.xxx:55742, DST-IP=172.20.100.104:1720, SRC-USER=xxx.xxx.xxx.xxx, SRC-NAME=SpeefFlow-Orig, INITIAL-INCOMING-LOCAL-ADDRESS=172.20.100.10, SELECTED-INCOMING-LOCAL-ADDRESS=172.20.100.10, RECORD-ID=1051552854-7280, ELAPSED-TIME=0, SETUP-TIME=00:00:02.000 +0500 Tue Apr 29 2003, CONNECT-TIME=00:00:02.000 +0500 Tue Apr 29 2003, DISCONNECT-TIME=00:00:02.000 +0500 Tue Apr 29 2003, DISCONNECT-CODE-LOCAL=139, DISCONNECT-CODE-Q931=34, SRC-BYTES-IN=209, DST-BYTES-IN=0, SRC-BYTES-OUT=0, DST-BYTES-OUT=0, QOS=0, CALLID=0229aed808cb711034580380b9fe5fad, CONFID=af996c3535cc231f3c0380b9fe5fac75, PROXY-MODE=0, ROUTE-RETRIES=2, SCD-TIME=0, SOURCE-TUNNELLING=1, PDD-TIME=0, PDD-REASON=N/A, LAST-CHECKED-DIALPEER=Term-Telnr-SpeedFlow
Tue Apr 29 00:00:03 2003, HOST=172.20.100.10, DST-NUMBER-IN=123#92214505240, DST-NUMBER-OUT=123#92214505240, DST-NUMBER-BILL=123#92214505240, SRC-IP=192.168.0.170:12913, DST-IP=172.20.100.107:1720, SRC-USER=192.168.0.170, SRC-NAME=SSSS-Tel, DST-NAME=Term-Khi-001, DIALPEER-NAME=Term-Khi-SSSS-Tel, INITIAL-INCOMING-LOCAL-ADDRESS=172.20.100.10, SELECTED-INCOMING-LOCAL-ADDRESS=172.20.100.10, RECORD-ID=1051552854-7281, ELAPSED-TIME=0, SETUP-TIME=00:00:03.000 +0500 Tue Apr 29 2003, CONNECT-TIME=00:00:03.000 +0500 Tue Apr 29 2003, DISCONNECT-TIME=00:00:03.000 +0500 Tue Apr 29 2003, DISCONNECT-CODE-LOCAL=136, DISCONNECT-CODE-Q931=34, SRC-BYTES-IN=187, DST-BYTES-IN=0, SRC-BYTES-OUT=0, DST-BYTES-OUT=0, QOS=0, CALLID=31af0da32ecd11d6bd4291ea99790924, CONFID=31ae717b2ecd11d6bd4091ea99790924, PROXY-MODE=0, ROUTE-RETRIES=1, SCD-TIME=0, SOURCE-TUNNELLING=1, PDD-TIME=0, PDD-REASON=N/A
Tue Apr 29 00:00:03 2003, HOST=172.20.100.10, DST-NUMBER-IN=123#92214505240, DST-NUMBER-OUT=123#92214505240, DST-NUMBER-BILL=123#92214505240, SRC-IP=192.168.0.170:12913, DST-IP=172.20.100.107:1720, SRC-USER=192.168.0.170, SRC-NAME=SSSS-Tel, INITIAL-INCOMING-LOCAL-ADDRESS=172.20.100.10, SELECTED-INCOMING-LOCAL-ADDRESS=172.20.100.10, RECORD-ID=1051552854-7281, ELAPSED-TIME=0, SETUP-TIME=00:00:03.000 +0500 Tue Apr 29 2003, CONNECT-TIME=00:00:03.000 +0500 Tue Apr 29 2003, DISCONNECT-TIME=00:00:03.000 +0500 Tue Apr 29 2003, DISCONNECT-CODE-LOCAL=139, DISCONNECT-CODE-Q931=34, SRC-BYTES-IN=187, DST-BYTES-IN=0, SRC-BYTES-OUT=0, DST-BYTES-OUT=0, QOS=0, CALLID=31af0da32ecd11d6bd4291ea99790924, CONFID=31ae717b2ecd11d6bd4091ea99790924, PROXY-MODE=0, ROUTE-RETRIES=2, SCD-TIME=0, SOURCE-TUNNELLING=1, PDD-TIME=0, PDD-REASON=N/A, LAST-CHECKED-DIALPEER=Term-Khi-SSSS-Tel
Tue Apr 29 00:00:03 2003, HOST=172.20.100.10, DST-NUMBER-IN=123#923465258538, DST-NUMBER-OUT=123#923465258538, DST-NUMBER-BILL=123#923465258538, SRC-IP=192.168.0.170:13338, DST-IP=172.20.100.104:1720, SRC-RTP-IP=192.168.0.170:17774, DST-RTP-IP=172.20.100.104:10700, SRC-USER=192.168.0.170, SRC-NAME=SSSS-Tel, DST-NAME=Term-Telnr-001, DIALPEER-NAME=Term-Telnr-SSSS-Tel, INITIAL-INCOMING-LOCAL-ADDRESS=172.20.100.10, SELECTED-INCOMING-LOCAL-ADDRESS=172.20.100.10, OUTGOING-LOCAL-ADDRESS=172.20.100.10, RECORD-ID=1051552854-7229, ELAPSED-TIME=0, SETUP-TIME=23:59:45.000 +0500 Mon Apr 28 2003, CONNECT-TIME=00:00:02.000 +0500 Tue Apr 29 2003, DISCONNECT-TIME=00:00:02.000 +0500 Tue Apr 29 2003, DISCONNECT-CODE-LOCAL=1, DISCONNECT-CODE-Q931=16, SRC-BYTES-IN=240, DST-BYTES-IN=414, SRC-BYTES-OUT=414, DST-BYTES-OUT=234, QOS=0, SRC-CODEC=g729 , DST-CODEC=g729 , CALLID=271f31862ecd11d6bccd91ea99790924, CONFID=271e955e2ecd11d6bccb91ea99790924, LAR-FAULT-REASON=2, PROXY-MODE=0, ROUTE-RETRIES=1, SCD-TIME=17, SOURCE-FASTSTART=1, DESTINATION-FASTSTART=1, SOURCE-TUNNELLING=1, DESTINATION-TUNNELLING=1, PDD-TIME=5, PDD-REASON=ALERT
Tue Apr 29 00:00:03 2003, HOST=172.20.100.10, SRC-NUMBER-IN=01186423627837, DST-NUMBER-IN=123#92214529540, SRC-NUMBER-OUT=01186423627837, DST-NUMBER-OUT=123#92214529540, SRC-NUMBER-BILL=01186423627837, DST-NUMBER-BILL=123#92214529540, SRC-IP=192.168.0.170:16340, DST-IP=172.20.100.107:1720, SRC-USER=192.168.0.170, SRC-NAME=SSSS-Tel, DST-NAME=Term-Khi-001, DIALPEER-NAME=Term-Khi-SSSS-Tel, INITIAL-INCOMING-LOCAL-ADDRESS=172.20.100.10, SELECTED-INCOMING-LOCAL-ADDRESS=172.20.100.10, RECORD-ID=1051552854-7283, ELAPSED-TIME=0, SETUP-TIME=00:00:03.000 +0500 Tue Apr 29 2003, CONNECT-TIME=00:00:03.000 +0500 Tue Apr 29 2003, DISCONNECT-TIME=00:00:03.000 +0500 Tue Apr 29 2003, DISCONNECT-CODE-LOCAL=136, DISCONNECT-CODE-Q931=34, SRC-BYTES-IN=206, DST-BYTES-IN=0, SRC-BYTES-OUT=0, DST-BYTES-OUT=0, QOS=0, CALLID=320e43b22ecd11d6bd4c91ea99790924, CONFID=320da6f22ecd11d6bd4a91ea99790924, PROXY-MODE=0, ROUTE-RETRIES=1, SCD-TIME=0, SOURCE-TUNNELLING=1, PDD-TIME=0, PDD-REASON=N/A
Tue Apr 29 00:00:03 2003, HOST=172.20.100.10, SRC-NUMBER-IN=01186423627837, DST-NUMBER-IN=123#92214529540, SRC-NUMBER-OUT=01186423627837, DST-NUMBER-OUT=123#92214529540, SRC-NUMBER-BILL=01186423627837, DST-NUMBER-BILL=123#92214529540, SRC-IP=192.168.0.170:16340, DST-IP=172.20.100.107:1720, SRC-USER
---------------------------------------------------------------------

output in archive file
--------------------
Mon Apr 28 20:34:59 2003\,172.20.100.10\,447818895341\,3454#923084586379\,xxx.xxx.xxx.xxx:50989\,172.20.100.102:1720\,xx x.xxx.xxx.xxx\,SpeefFlow-Orig\,Term-Mobi-002\,Term-Mobi-SpeedFlow\,172.20.100.10\,172.20.100.10\,12\,20:34:47.000 +0500 Mon Apr 28 2003\,20:34:59.000 +0500 Mon Apr 28 2003\,1\,16\,g729

output on screen monitor.
------------------------
Mon Apr 28 20:34:59 2003,172.20.100.10,447818895341,3454#923084586379,xxx.xxx.xxx.xxx:50989,172.20.100.102:1720,xxx.xxx. xxx.xxx,SpeefFlow-Orig,Term-Mobi-002,Term-Mobi-SpeedFlow,172.20.100.10,172.20.100.10,12,20:34:47.000 +0500 Mon Apr 28 2003,20:34:59.000 +0500 Mon Apr 28 2003,1,16,g729

-----------------------

one more thing what i tried. i copied the output file created after running this script to windows pc for examinig and i found

its showing a square box instead of \ . I think its a blank or white space.

Last edited by sfaizan; 07-31-2008 at 06:10 AM..
# 11  
Old 08-01-2008
I figured it out ... its a blank space which need to be trim. something to add in sed command ????
# 12  
Old 08-04-2008
# trim trailing spaces, note the s// matches what matched.
/ $/s///

# delete empty lines
/^$/d
# 13  
Old 08-04-2008
# delete leading whitespace (spaces, tabs) from front of each line
# aligns all text flush left
sed 's/^[ \t]*//' # see note on '\t' at end of file

# delete trailing whitespace (spaces, tabs) from end of each line
sed 's/[ \t]*$//' # see note on '\t' at end of file

# delete BOTH leading and trailing whitespace from each line
sed 's/^[ \t]*//;s/[ \t]*$//'


Taken from Handy one-liners for SED
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Making a parser

input 1..100km 112..403km 500..623km required output 1..51 112..162 500..550 (i.e 50kms added to the initial distance) (2 Replies)
Discussion started by: ANKIT ROY
2 Replies

2. Shell Programming and Scripting

Parser

Hi All, I am trying to create a parser to find out what cobol programs are being called by which JCL's. I need to search recursively until the main cobol program is found being called by a JCL. I tried to create a script but I am not able to generalize it. Can someone please help. ... (1 Reply)
Discussion started by: nua7
1 Replies

3. Shell Programming and Scripting

SQL Parser

Hi, I have been assigned a task to migrate few thousands of sql scripts to a different db format. there could be sub queries and complex joins. there would be functions that needs to be replaced from a given list to another values. this should also parse the sub\inline queries. Can you please... (1 Reply)
Discussion started by: hitmansilentass
1 Replies

4. Shell Programming and Scripting

File Parser

Hi need help parsing a file. I have tag fields and values in a file with delimiter |. sample records from the file listed below 8=value|9=value|35=value|49=value|56=value|34=value|50=value|48=value|10=value 8=value|9=value|35=value|49=value|56=value|34=value|51=value|48=value|10=value... (2 Replies)
Discussion started by: subramanian
2 Replies

5. Programming

Parser

Hi Everyone I have an out put of multiple lines which I would like to parse and retrieve certain info from it. The output consists of multiple sections that starts with the line Client: and ends with STL tag: each section separated by an empty line. So basically somehting like Client: ... (10 Replies)
Discussion started by: bombcan1
10 Replies

6. Shell Programming and Scripting

Parser with sed

Hi, I have this variable: <a href="http://www.rtve.es/mediateca/videos/20100916/video-calamares-rellenos-salsa-pimientos-garbanzos-16-09-10/878586.shtml">V�deo: Calamares rellenos con salsa de pimientos y ...</a> I would like to have: ... (7 Replies)
Discussion started by: mierdatuti
7 Replies

7. Shell Programming and Scripting

Incremental log parser

I have log file that is incremented every second and is rather big. I need monitor error in this file. I do not want to parse it all every time. I want parse it first time then remember last position (as byte for example) All consequent parsing I want to start from last saved position to the... (3 Replies)
Discussion started by: Narcom
3 Replies

8. Shell Programming and Scripting

Help with an (easy) parser

Hello, i'm workig with a file with structural information about biological macromolecules (proteins etc). In a certain file, the info is structured like this @<TRIPOS>MOLECULE blah 1 blah 2 blah 3 @<TRIPOS>MOLECULE foo 1 foo 2 foo 3 @<TRIPOS>MOLECULE mmm 1 mmm 2 mmm 3 I would... (7 Replies)
Discussion started by: aristegui
7 Replies

9. Shell Programming and Scripting

Text Parser

I am having a text file as follows say server.txt Date Time server ip error code -------------------------------------------------------------------------- 02/21/2008 18:10:14 server1 xxx.xxx.xxx.xxx 6 02/21/2008 08:10:14 server2 ... (8 Replies)
Discussion started by: karthikn7974
8 Replies

10. Shell Programming and Scripting

string parser

I am new to scripting I want to parse a string in a loop eg A:B:C:D E:F:G:H and put them in different variable attr1 = A attr2 = B attr3 = C attr4 = D . . /* do processing with attr1, attr2, attr3 and attr4 */ then go to next line E:F:G:H and again assign... (8 Replies)
Discussion started by: flextronics
8 Replies
Login or Register to Ask a Question