To ALL
I have not used TekTips much in the past. My experience with all of the people who posted on this was outstanding. Is there a way to rate or acknowledge the programers that helped me? You are all topnotch!
Thank you all!
I used feherke code in a script and it runs pretty quick too less than 10 seconds. I must be doing something wrong with michaelvv script. Anyway they are all giving the same result now. Some with ; some with , seperators
IMSI = 123456000000049
; APNTPLID = 3
; QOSTPLID = 108
; APNTPLID = 1
...
Thank you all for your responses. I will try to answer all of the questions asked.
The number of lines in the input file is 965971
The original AWK script took around 3.5 hours to run.
The C script took less than 10 seconds to run, but the format when opened with Excel isn't quite right. After I...
Turns out I am an idiot. I did not realize there was significance in the 8 distinct lines. I ran the command again as you posted it and it works.
Is there somthing other than AWK that might be better? The file I am running this on is around 40 meg in size and I think it is pulling it all into...
Thank you for your reply
This is the error I get when I try to run the command
awk 'NR==1 {LINE=$0 next} /^IMSI/ {print LINE LINE=$0 next}{LINE=LINE "," $0}END{print LINE}' output.txt
awk: syntax error at source line 1
context is
NR==1 {LINE=$0 >>> next <<< } /^IMSI/ {print LINE LINE=$0...
I have a fairly large file (40 meg) of text that looks like this
IMSI = 123456000000049
APNTPLID = 3
QOSTPLID = 108
APNTPLID = 1
QOSTPLID = 108
APNTPLID = 2...
I have added the following code in an attempt to extract the date. What am I doing wrong?
BEGIN {
if ($1 ~ /^XXXX/){
date = substr("Date", 36, 20)
print date
}
print "LINK,SET,R-ERLANGS,T-ERLANGS"
}
# reading the first file (FNR == NR)...
I just realized that the cut and paste from file1 was missing the date. file1 actually starts like this.
ZOLT:;
LOADING PROGRAM VERSION 6.16-0
XXXX XXXXXXXXX 2009-07-20 15:40:23
SIGNALLING LINK LOAD
ACTIVE UNIT
METERS OF LAST PERIOD: 15:00:00 - 15:30:00 (30 MIN)
TDM...
Hey that works good if I remove awk -v OFS=, ' from the beginning and ' file1 file2 from the end. That of course leaves the output without coma seperation, but I can live with that. You Rock!!!
I do have two more questions if you don't mind.
How would I add the Date stamp from one of the...
First I tried Perl, but ran into trouble opening 2 files at the same time. I found a couple articles on the web that indicated that Perl has issues with opening more than one at a time.
Then I started researching AWK and it seemed like it should be possible. I have tried multiple different...
I am new to awk. I have two files and need to combine parts of each file into one by lining up a column in each.
file1
ZOLT:;
LOADING PROGRAM VERSION 6.16-0
SIGNALLING LINK LOAD
ACTIVE UNIT
METERS OF LAST PERIOD: 15:00:00 - 15:30:00 (30 MIN)
TDM BASED LINKS:
================...
We are also the PSTN in this senario. That is why I kept bringing up the Cisco Platform. The vendor of the switch said that the screening ind. was the problem. The Cicso techs were able to change it on their platform and it worked. I will go back to the switch vendor and tell them that we can't...
When I send them 10 digits, they ignore it and show a preset CLID #. So Basically I am asking them to show the CLID of the DN if I send them 4 digits (prefixing NPA/NXX) and show the pre-defined # if I don't send them any digits in the CLID field. This is the same setup that we have with the...
We changed this and it did not have any effect. We have a Cisco VOIP system connected to the same PSTN as the Nortel and it works. We traped the messages with a protocol anylyzer and the
Screening indicator=User provided,not screened
is the only difference that we can see. Is there anyway that...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.