Search Results

Search: Posts Made By: gillesi
2,768
Posted By Don Cragun
If you don't like perl, or if you want a...
If you don't like perl, or if you want a commented script to help you understand what is going on, you could also consider the following bash and /usr/xpg4/bin/awk scripts that should work fine on a...
2,768
Posted By RudiC
Imagine creating 52 million (2 mio blocks * 13...
Imagine creating 52 million (2 mio blocks * 13 lines * 2 tests) processes to run a grep in each - might take some time. Try

awk 'match ($0, /mscId=[^,]*/) {printf "%s, ", substr ($0, RSTART,...
2,768
Posted By drysdalk
Hi, (Have just edited the lines that print...
Hi,

(Have just edited the lines that print the output so you get everything in the format you want)

Sorry, my solution won't quite do - just noticed you need two lines from the blocks, not just...
4,761
Posted By RudiC
Try this "optimized" version: awk -F: ' BEGIN...
Try this "optimized" version:
awk -F: '
BEGIN {HD="MSISDN,IMSI,NAM,TS11,TS21,TS22,TS62,BAIC,BAOC,APNID1,APNID2" # define the fields to extract, and prepare a header for eventual...
4,761
Posted By RudiC
I'd be very surprised if it really took 6h,...
I'd be very surprised if it really took 6h, except on a very busy host. For a 15MB file with 1101925 lines:
time sh ou.awk
real 0m4.469s
user 0m4.400s
sys 0m0.040sEDIT:
For a...
4,761
Posted By vgersh99
it would be interesting to know the exact timing,...
it would be interesting to know the exact timing, but 6 hours sounds somewhat/extremely high... How did you arrive at this number? 6 hours?

Could you try the suggestion from post 5...
4,761
Posted By vgersh99
if you're using RudiC's code, change delete RES...
if you're using RudiC's code, change delete RES to split("", RES)
4,761
Posted By RudiC
Similar problems have been solved in these fora...
Similar problems have been solved in these fora umpteen times. Would this adaption of one of those come close to what you need?
awk -F: '
BEGIN ...
4,761
Posted By vgersh99
something along these lines... awk -f gil.awk...
something along these lines...
awk -f gil.awk myInputFile where gil.awk is:

BEGIN {
FS=": *"
OFS=","

tags="MSISDN,IMSI,NAM,TS11,TS21,TS22,TS62,BAIC,BAOC,APNID1,APNID2,OBO,OBI"
...
Showing results 1 to 9 of 9

 
All times are GMT -4. The time now is 05:54 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy