Mapping with series from master file and calculate count


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Mapping with series from master file and calculate count
# 1  
Old 09-07-2010
Question Mapping with series from master file and calculate count

Hi All,

My shell script is calculating the count of each shortcode series wise whose sample output is as follows:
Code:
--------------------------
56882
9124 1
9172 1
9173 4
8923 6
9175 1
9058 2
7398 2
--------------------------
58585
series count
9124 1
8858 17
9061 21
9125 21
9126 7
9171 106
9172 4
7899 4
9173 7
9175 14
9059 92
7871 94
7396 183
7398 386
9060 13
--------------------------
58888
series count
9124 12
8858 2
9061 44
9125 36
9062 139
9171 20
9126 17
9172 94
9173 84
7899 113
8923 76
9175 59
9058 101
7870 327
7871 36
9059 24
7396 19
9122 202
7398 55
9060 62
--------------------------
57575
series count
8858 6
9124 6
9061 5
9062 26
9125 11
9171 5
9126 43
9172 14
9173 43
7899 7
9058 25
7870 15
8923 46
9175 71
7871 6
9059 13
7396 28
9122 17
7398 37
9060 15
--------------------------
57677
series count
9175 5

Code for generating above output is as follows:
Code:
Ydate=`date -d'-1 days' +'%Y-%m-%d'`
shortcodes=( "56882" "58585" "58888" "57575" "57677" );
for shortcode in ${shortcodes[@]}
do
        echo "--------------------------";
        echo $shortcode;
        echo "series count";
        grep "ShortCode=tel:${shortcode}" /opt/bea/ocsg_4.1/logs/customlogs/App_OP.log.$Ydate | awk -F"|" '{ arr[substr($2,1,4)]++ } END { for( no in arr) { print no , arr[no] } }'
done

And i have one master file whose data is as follows:
Code:
9059 North
7398 South
9175 North
9122 South
9175 North
7871 South

Now I want to map each series count with its Region mention in the master file and calculate the count region wise like following:
Code:
--------------------------
57677
 
North 5
South 0
--------------------------
57575
North 178
South 200
--------------------------
58888
North 123
South 109

Please help me in modifying my scipt for getting the above output
Thanks in advance.
# 2  
Old 09-07-2010
give some sample of file:

Code:
/opt/bea/ocsg_4.1/logs/customlogs/App_OP.log.$Ydate



---------- Post updated at 11:38 PM ---------- Previous update was at 11:19 PM ----------

Code:
Ydate=`date -d'-1 days' +'%Y-%m-%d'`
shortcodes=( "56882" "58585" "58888" "57575" "57677" );
for shortcode in ${shortcodes[@]}
do
        echo "--------------------------";
        echo $shortcode;
#        echo "series count";
#        grep "ShortCode=tel:${shortcode}" /opt/bea/ocsg_4.1/logs/customlogs/App_OP.log.$Ydate | awk -F"|" '{ arr[substr($2,1,4)]++ } END { for( no in arr) { print no , arr[no] } }'
        awk -v s=$shortcode -F"|" '$0~"ShortCode=tel:" s {print substr($2,1,4)}' /opt/bea/ocsg_4.1/logs/customlogs/App_OP.log.$Ydate > tmp.log
        awk 'NR==FNR{a[$1]=$2;next}
               { if (a[$1]=="North") North++
                 if (a[$1]=="South") South++}
               END {  print "North", North; print "South", South}
              ' master.txt tmp.log 
done


Last edited by rdcwayx; 09-08-2010 at 01:22 AM..
# 3  
Old 09-08-2010
Question Mapping with series from master file and calculate count

Hi rdcwayx

Sample content of the file is as follows:
Code:
08-Sep-2010 08:45:12,437|7398473722|subscription_app|-7932740d%3A12aedfb6d15%3A-3d49|ChargeAmount|ValidateMSISDNInterceptor - validation status success
08-Sep-2010 08:45:12,437|7398473722|subscription_app|-7932740d%3A12aedfb6d15%3A-3d49|ChargeAmount|SubscriberProfileInterceptor - parameter in the request {arg0.referenceCode=;balanceEnquiry:true;subsChannel:Unknown;channelType:Subscription;transactionId:-7932740d%3A12aedfb6d15%3A-3d49;pricePtAvl:true;serviceId:CR03;Circle_Name:UP;Circle_ID:19;eventType:subscription;isRated:Yes;productName:VAS0003ALL;basePrice:0.0;contentId:4945;Sub_Profile:Pre-Paid;subsType:RECURRING, arg0.endUserIdentifier=tel:7398473722, arg0.charge.description= Retrieve-Balance , arg0.charge.currency=INR, arg0.charge.code=, arg0.charge.amount=0.0}
08-Sep-2010 08:45:12,437|7398473722|subscription_app|-7932740d%3A12aedfb6d15%3A-3d49|ChargeAmount|SubscriberProfileInterceptor - subscriber details fetched sucessfully- {arg0.referenceCode=;balanceEnquiry:true;subsChannel:Unknown;channelType:Subscription;transactionId:-7932740d%3A12aedfb6d15%3A-3d49;pricePtAvl:true;serviceId:CR03;Circle_Name:UP;Circle_ID:19;eventType:subscription;isRated:Yes;productName:VAS0003ALL;basePrice:0.0;contentId:4945;Sub_Profile:Pre-Paid;subsType:RECURRING, arg0.endUserIdentifier=7398473722, arg0.charge.description= Retrieve-Balance , arg0.charge.currency=INR, arg0.charge.code=, arg0.charge.amount=0.0, refCodeMap={balanceEnquiry=true, subsChannel=Unknown, channelType=Subscription, transactionId=-7932740d%3A12aedfb6d15%3A-3d49, pricePtAvl=true, eventType=subscription, contentId=4945, serviceId=CR03, Circle_Name=UP, Circle_ID=19, isRated=Yes, productName=VAS0003ALL, basePrice=0.0, subsType=RECURRING, Sub_Profile=Pre-Paid}}
08-Sep-2010 08:45:12,438|7398473722|subscription_app|-7932740d%3A12aedfb6d15%3A-3d49|ChargeAmount|SEInterceptor - Subscription exists [No], ProductName [VAS0003ALL]
08-Sep-2010 08:45:12,438|7398473722|subscription_app|-7932740d%3A12aedfb6d15%3A-3d49|ChargeAmount|REInterceptor -  Is already Rated [Yes] RatedPrice [0.0]
08-Sep-2010 08:45:12,438|7398473722|subscription_app|-7932740d%3A12aedfb6d15%3A-3d49|ChargeAmount|ChargingInterceptor - subscriber details processed sucessfully- {arg0.referenceCode=balanceEnquiry:true;subsChannel:Unknown;channelType:Subscription;transactionId:-7932740d%3A12aedfb6d15%3A-3d49;pricePtAvl:true;eventType:subscription;contentId:4945;serviceId:CR03;Circle_Name:UP;Circle_ID:19;isRated:Yes;productName:VAS0003ALL;basePrice:0.0;subsType:RECURRING;Sub_Profile:Pre-Paid, arg0.endUserIdentifier=7398473722, arg0.charge.description= Retrieve-Balance , arg0.charge.currency=INR, arg0.charge.code=, arg0.charge.amount=0.0}
08-Sep-2010 08:45:12,440|7398473722|subscription_app|-7932740d%3A12aedfb6d15%3A-3d49|ChargeAmount|CustomCDRInterceptor - CDR Info[Optional_Field1:,Subscription_Channel:Unknown,Optional_Field2:,Transaction_ID:,Content_ID:4945,IMEI:,Product_Name:VAS0003ALL,PPL_FLAG:,Charge_Code:,Base_Price:0.0,CustomerID:B_20148717,Circle_Name:UP,Sender_MSISDN:,IMSI:405879121306855,Content_Status:,Location:UP,Circle_ID:19,Original_Content_Owner_ID:,CPNAME:default_provider,Content_Price:0.0,Zone:Default,Content_Name:,Static_ID:UP#17750316,External_Correlation_Id:-7932740d%3A12aedfb6d15%3A-3d49,Subscription_Type:RECURRING,MSISDN:7398473722,Transaction_Mode:Subscription,Transaction_DateTime:2010-09-08 08:45:12 GMT+05:30,Content_Type:,Sub_Profile:Pre-Paid,CPID:,Other_Info:]
08-Sep-2010 08:45:12,440|7398473722|subscription_app|-7932740d%3A12aedfb6d15%3A-3d49|ChargeAmount|GetBalance|PaymentPlugin-Request -  Get User Balance of: 7398473722
08-Sep-2010 08:45:12,504|9060416323|subscription_app|654402f9%3A12aed9f0eab%3A-1da|ChargeAmount|Request Params:[Address:tel:9060416323,ChargingInformation:[Code:,Currency:INR,Description: Retrieve-Balance ,Amount:0.0],ReferenceCode:balanceEnquiry:true;subsChannel:Unknown;pricePtAvl:true;transactionId:654402f9%3A12aed9f0eab%3A-1da;channelType:Subscription;eventType:subscription;contentName:;contentType:;senderMSISDN:;contentId:4945;cpID:;serviceId:CR03;cpName:;Circle_Name:KA;Circle_ID:9;isRated:Yes;productName:VAS0003ALL;basePrice:0.0;subsType:RECURRING;Sub_Profile:Pre-Paid]
08-Sep-2010 08:45:12,504|9060416323|subscription_app|654402f9%3A12aed9f0eab%3A-1da|ChargeAmount|ValidateMSISDNInterceptor - msisdn to be validated 9060416323
08-Sep-2010 08:45:12,507|9060416323|subscription_app|654402f9%3A12aed9f0eab%3A-1da|ChargeAmount|ValidateMSISDNInterceptor - validation status success
08-Sep-2010 08:45:12,507|9060416323|subscription_app|654402f9%3A12aed9f0eab%3A-1da|ChargeAmount|SubscriberProfileInterceptor - parameter in the request {arg0.referenceCode=;balanceEnquiry:true;subsChannel:Unknown;channelType:Subscription;transactionId:654402f9%3A12aed9f0eab%3A-1da;pricePtAvl:true;serviceId:CR03;Circle_Name:KA;Circle_ID:9;eventType:subscription;isRated:Yes;productName:VAS0003ALL;basePrice:0.0;contentId:4945;Sub_Profile:Pre-Paid;subsType:RECURRING, arg0.endUserIdentifier=tel:9060416323, arg0.charge.description= Retrieve-Balance , arg0.charge.currency=INR, arg0.charge.code=, arg0.charge.amount=0.0}
08-Sep-2010 08:45:12,508|9060416323|subscription_app|654402f9%3A12aed9f0eab%3A-1da|ChargeAmount|SubscriberProfileInterceptor - subscriber details fetched sucessfully- {arg0.referenceCode=;balanceEnquiry:true;subsChannel:Unknown;channelType:Subscription;transactionId:654402f9%3A12aed9f0eab%3A-1da;pricePtAvl:true;serviceId:CR03;Circle_Name:KA;Circle_ID:9;eventType:subscription;isRated:Yes;productName:VAS0003ALL;basePrice:0.0;contentId:4945;Sub_Profile:Pre-Paid;subsType:RECURRING, arg0.endUserIdentifier=9060416323, arg0.charge.description= Retrieve-Balance , arg0.charge.currency=INR, arg0.charge.code=, arg0.charge.amount=0.0, refCodeMap={balanceEnquiry=true, subsChannel=Unknown, channelType=Subscription, transactionId=654402f9%3A12aed9f0eab%3A-1da, pricePtAvl=true, eventType=subscription, contentId=4945, serviceId=CR03, Circle_Name=KA, Circle_ID=9, isRated=Yes, productName=VAS0003ALL, basePrice=0.0, subsType=RECURRING, Sub_Profile=Pre-Paid}}
08-Sep-2010 08:45:12,508|9060416323|subscription_app|654402f9%3A12aed9f0eab%3A-1da|ChargeAmount|SEInterceptor - Subscription exists [No], ProductName [VAS0003ALL]
08-Sep-2010 08:45:12,508|9060416323|subscription_app|654402f9%3A12aed9f0eab%3A-1da|ChargeAmount|REInterceptor -  Is already Rated [Yes] RatedPrice [0.0]
08-Sep-2010 08:45:12,509|9060416323|subscription_app|654402f9%3A12aed9f0eab%3A-1da|ChargeAmount|ChargingInterceptor - subscriber details processed sucessfully- {arg0.referenceCode=balanceEnquiry:true;subsChannel:Unknown;channelType:Subscription;transactionId:654402f9%3A12aed9f0eab%3A-1da;pricePtAvl:true;eventType:subscription;contentId:4945;serviceId:CR03;Circle_Name:KA;Circle_ID:9;isRated:Yes;productName:VAS0003ALL;basePrice:0.0;subsType:RECURRING;Sub_Profile:Pre-Paid, arg0.endUserIdentifier=9060416323, arg0.charge.description= Retrieve-Balance , arg0.charge.currency=INR, arg0.charge.code=, arg0.charge.amount=0.0}
08-Sep-2010 08:45:12,510|9060416323|subscription_app|654402f9%3A12aed9f0eab%3A-1da|ChargeAmount|CustomCDRInterceptor - CDR Info[Optional_Field1:,Subscription_Channel:Unknown,Optional_Field2:,Transaction_ID:,Content_ID:4945,IMEI:,Product_Name:VAS0003ALL,PPL_FLAG:,Charge_Code:,Base_Price:0.0,CustomerID:B_10966249,Circle_Name:KA,Sender_MSISDN:,IMSI:405820120702680,Content_Status:,Location:KA,Circle_ID:9,Original_Content_Owner_ID:,CPNAME:default_provider,Content_Price:0.0,Zone:,Content_Name:,Static_ID:KA#11470986,External_Correlation_Id:654402f9%3A12aed9f0eab%3A-1da,Subscription_Type:RECURRING,MSISDN:9060416323,Transaction_Mode:Subscription,Transaction_DateTime:2010-09-08 08:45:12 GMT+05:30,Content_Type:,Sub_Profile:Pre-Paid,CPID:,Other_Info:]
08-Sep-2010 08:45:12,510|9060416323|subscription_app|654402f9%3A12aed9f0eab%3A-1da|ChargeAmount|GetBalance|PaymentPlugin-Request -  Get User Balance of: 9060416323
08-Sep-2010 08:45:12,567|9058273737|subscription_app||SendSms|Request Params:[Address:tel:9058273737,Message:Dear subscriber your My Tunes service has been temporarily  Suspended due to insufficient balance. Please recharge your account to continue this service.,SenderName:52211,ChargingInformation:[],SimpleReference:[],X-Params:[]]
08-Sep-2010 08:45:12,567|9058273737|subscription_app||SendSms|ValidateMSISDNInterceptor - msisdn to be validated 9058273737
08-Sep-2010 08:45:12,568|9058273737|subscription_app||SendSms|ValidateMSISDNInterceptor - validation status success
08-Sep-2010 08:45:12,568|9058273737|subscription_app|BEA1-4EBCFC67DA22|SendSms|Request Params:[Address:tel:9058273737,Message:Dear subscriber your My Tunes service has been temporarily  Suspended due to insufficient balance. Please recharge your account to continue this service.,SenderName:52211,ChargingInformation:[],SimpleReference:[Correlator:BEA1-4EBCFC67DA22,InterfaceName:null,EndPoint:http://172.30.16.226:9001/CPAdapter/SmsNotification],X-Params:[]]
08-Sep-2010 08:45:12,568|9058273737|subscription_app|BEA1-4EBCFC67DA22|SendSms|AddAppCallBackAndCorrelatorInterceptor - Correlator:BEA1-4EBCFC67DA22,CallBackURL:http://172.30.16.226:9001/CPAdapter/SmsNotification
08-Sep-2010 08:45:12,569|9058273737|subscription_app|BEA1-4EBCFC67DA22|SendSms|PrefixCountryCodeInterceptor - MSISDN after prefixing countrycode tel:919058273737
08-Sep-2010 08:45:12,575|9058273737|subscription_app|BEA1-4EBCFC67DA22|SendSms|Response Parameters:[Result:01261371283915712002211-1144493704]
08-Sep-2010 08:45:12,670|9060416323|subscription_app|654402f9%3A12aed9f0eab%3A-1da|ChargeAmount|GetBalance|PaymentPlugin-Response -  Retrieved Balance Bucket: 1;20091003;20110305;28.00;|
08-Sep-2010 08:45:12,671|9060416323|subscription_app|654402f9%3A12aed9f0eab%3A-1da|ChargeAmount|Exception: [Message:null]
08-Sep-2010 08:45:12,819|7398473722|subscription_app|-7932740d%3A12aedfb6d15%3A-3d49|ChargeAmount|GetBalance|PaymentPlugin-Response -  Retrieved Balance Bucket: 1;20091003;20110228;15.50;|
08-Sep-2010 08:45:12,820|7398473722|subscription_app|-7932740d%3A12aedfb6d15%3A-3d49|ChargeAmount|Exception: [Message:null]
08-Sep-2010 08:45:12,892|TN#24895824|phtunes_app|1283544417589|NotifySmsReception|CP URL:http://172.30.24.52/unitech_sms/unitechsms.php, AppInstanceId:phtunes_app, Keyword:iq, SID:tel:TN%2324895824, TransactionID:SDP-DM-31281377
08-Sep-2010 08:45:12,892|TN#24895824|phtunes_app|1283544417589|NotifySmsReception|CP URL to be called : http://172.30.24.52/unitech_sms/unit...20Robin%20¥¥
08-Sep-2010 08:45:13,090|TN#24895824|phtunes_app|1283544417589|NotifySmsReception|HTTP Response Code:200, ErrorCodeReturned:200
08-Sep-2010 08:45:13,108|9058332533|subscription_app|3cf8ebf7%3A12aee0ad9f7%3A-2913|ChargeAmount|Request Params:[Address:tel:9058332533,ChargingInformation:[Code:,Currency:INR,Description: Retrieve-Balance ,Amount:0.0],ReferenceCode:balanceEnquiry:true;subsChannel:Unknown;pricePtAvl:true;transactionId:3cf8ebf7%3A12aee0ad9f7%3A-2913;channelType:Subscription;eventType:subscription;contentName:;contentType:;senderMSISDN:;contentId:4945;cpID:;serviceId:CR03;cpName:;Circle_Name:UK;Circle_ID:18;isRated:Yes;productName:VAS0003ALL;basePrice:0.0;subsType:RECURRING;Sub_Profile:Pre-Paid]
08-Sep-2010 08:45:13,108|9058332533|subscription_app|3cf8ebf7%3A12aee0ad9f7%3A-2913|ChargeAmount|ValidateMSISDNInterceptor - msisdn to be validated 9058332533
08-Sep-2010 08:45:13,110|9058332533|subscription_app|3cf8ebf7%3A12aee0ad9f7%3A-2913|ChargeAmount|ValidateMSISDNInterceptor - validation status success
08-Sep-2010 08:45:13,111|9058332533|subscription_app|3cf8ebf7%3A12aee0ad9f7%3A-2913|ChargeAmount|SubscriberProfileInterceptor - parameter in the request {arg0.referenceCode=;balanceEnquiry:true;subsChannel:Unknown;channelType:Subscription;transactionId:3cf8ebf7%3A12aee0ad9f7%3A-2913;pricePtAvl:true;serviceId:CR03;Circle_Name:UK;Circle_ID:18;eventType:subscription;isRated:Yes;productName:VAS0003ALL;basePrice:0.0;contentId:4945;Sub_Profile:Pre-Paid;subsType:RECURRING, arg0.endUserIdentifier=tel:9058332533, arg0.charge.description= Retrieve-Balance , arg0.charge.currency=INR, arg0.charge.code=, arg0.charge.amount=0.0}
08-Sep-2010 08:45:13,111|9058332533|subscription_app|3cf8ebf7%3A12aee0ad9f7%3A-2913|ChargeAmount|SubscriberProfileInterceptor - subscriber details fetched sucessfully- {arg0.referenceCode=;balanceEnquiry:true;subsChannel:Unknown;channelType:Subscription;transactionId:3cf8ebf7%3A12aee0ad9f7%3A-2913;pricePtAvl:true;serviceId:CR03;Circle_Name:UK;Circle_ID:18;eventType:subscription;isRated:Yes;productName:VAS0003ALL;basePrice:0.0;contentId:4945;Sub_Profile:Pre-Paid;subsType:RECURRING, arg0.endUserIdentifier=9058332533, arg0.charge.description= Retrieve-Balance , arg0.charge.currency=INR, arg0.charge.code=, arg0.charge.amount=0.0, refCodeMap={balanceEnquiry=true, subsChannel=Unknown, channelType=Subscription, transactionId=3cf8ebf7%3A12aee0ad9f7%3A-2913, pricePtAvl=true, eventType=subscription, contentId=4945, serviceId=CR03, Circle_Name=UK, Circle_ID=18, isRated=Yes, productName=VAS0003ALL, basePrice=0.0, subsType=RECURRING, Sub_Profile=Pre-Paid}}
08-Sep-2010 08:45:13,111|9058332533|subscription_app|3cf8ebf7%3A12aee0ad9f7%3A-2913|ChargeAmount|SEInterceptor - Subscription exists [No], ProductName [VAS0003ALL]
08-Sep-2010 08:45:13,112|9058332533|subscription_app|3cf8ebf7%3A12aee0ad9f7%3A-2913|ChargeAmount|REInterceptor -  Is already Rated [Yes] RatedPrice [0.0]
08-Sep-2010 08:45:13,112|9058332533|subscription_app|3cf8ebf7%3A12aee0ad9f7%3A-2913|ChargeAmount|ChargingInterceptor - subscriber details processed sucessfully- {arg0.referenceCode=balanceEnquiry:true;subsChannel:Unknown;channelType:Subscription;transactionId:3cf8ebf7%3A12aee0ad9f7%3A-2913;pricePtAvl:true;eventType:subscription;contentId:4945;serviceId:CR03;Circle_Name:UK;Circle_ID:18;isRated:Yes;productName:VAS0003ALL;basePrice:0.0;subsType:RECURRING;Sub_Profile:Pre-Paid, arg0.endUserIdentifier=9058332533, arg0.charge.description= Retrieve-Balance , arg0.charge.currency=INR, arg0.charge.code=, arg0.charge.amount=0.0}
08-Sep-2010 08:45:13,113|9058332533|subscription_app|3cf8ebf7%3A12aee0ad9f7%3A-2913|ChargeAmount|CustomCDRInterceptor - CDR Info[Optional_Field1:,Subscription_Channel:Unknown,Optional_Field2:,Transaction_ID:,Content_ID:4945,IMEI:,Product_Name:VAS0003ALL,PPL_FLAG:,Charge_Code:,Base_Price:0.0,CustomerID:B_11837543,Circle_Name:UK,Sender_MSISDN:,IMSI:405818120677947,Content_Status:,Location:UK,Circle_ID:18,Original_Content_Owner_ID:,CPNAME:default_provider,Content_Price:0.0,Zone:,Content_Name:,Static_ID:UK#11861962,External_Correlation_Id:3cf8ebf7%3A12aee0ad9f7%3A-2913,Subscription_Type:RECURRING,MSISDN:9058332533,Transaction_Mode:Subscription,Transaction_DateTime:2010-09-08 08:45:13 GMT+05:30,Content_Type:,Sub_Profile:Pre-Paid,CPID:,Other_Info:]
08-Sep-2010 08:45:13,114|9058332533|subscription_app|3cf8ebf7%3A12aee0ad9f7%3A-2913|ChargeAmount|GetBalance|PaymentPlugin-Request -  Get User Balance of: 9058332533
08-Sep-2010 08:45:13,248|919124429174|subscription_app|BEA1-606A01D09CBD|NotifySmsDeliveryReceipt|Message Details:[Correlator:BEA1-606A01D09CBD,DeliveryStatus:[Address:tel:919124429174,DeliveryStatus:DeliveryImpossible]]
08-Sep-2010 08:45:13,248|919124429174|subscription_app|BEA1-606A01D09CBD|NotifySmsDeliveryReceipt|DeliveryStatus DeliveryImpossible: Delivery has failed
08-Sep-2010 08:45:13,248|919124429174|subscription_app|BEA1-606A01D09CBD|NotifySmsDeliveryReceipt|PrefixCountryCodeInterceptor - MSISDN before removing countrycode tel:919124429174
08-Sep-2010 08:45:13,248|919124429174|subscription_app|BEA1-606A01D09CBD|NotifySmsDeliveryReceipt|PrefixCountryCodeInterceptor - MSISDN after removing countrycode tel:9124429174
08-Sep-2010 08:45:13,249|919124429174|subscription_app|BEA1-606A01D09CBD|NotifySmsDeliveryReceipt|InjectCPURLandKeywordInterceptor - CP URL:, KEYWORD:, MASK:, DM:
08-Sep-2010 08:45:13,251|919124429174|subscription_app|BEA1-606A01D09CBD|NotifySmsDeliveryReceipt|RefundInterceptor - Delivery Failed
08-Sep-2010 08:45:13,265|919124429174|subscription_app|BEA1-606A01D09CBD|NotifySmsDeliveryReceipt|Response Parameters:[Result:Success]
08-Sep-2010 08:45:13,304|919126370177|subscription_app|BEA1-607101D09CBD|NotifySmsDeliveryReceipt|Message Details:[Correlator:BEA1-607101D09CBD,DeliveryStatus:[Address:tel:919126370177,DeliveryStatus:DeliveryImpossible]]
08-Sep-2010 08:45:13,304|919126370177|subscription_app|BEA1-607101D09CBD|NotifySmsDeliveryReceipt|DeliveryStatus DeliveryImpossible: Delivery has failed
08-Sep-2010 08:45:13,304|919126370177|subscription_app|BEA1-607101D09CBD|NotifySmsDeliveryReceipt|PrefixCountryCodeInterceptor - MSISDN before removing countrycode tel:919126370177
08-Sep-2010 08:45:13,304|919126370177|subscription_app|BEA1-607101D09CBD|NotifySmsDeliveryReceipt|PrefixCountryCodeInterceptor - MSISDN after removing countrycode tel:9126370177
08-Sep-2010 08:45:13,305|919126370177|subscription_app|BEA1-607101D09CBD|NotifySmsDeliveryReceipt|InjectCPURLandKeywordInterceptor - CP URL:, KEYWORD:, MASK:, DM:
08-Sep-2010 08:45:13,306|919126370177|subscription_app|BEA1-607101D09CBD|NotifySmsDeliveryReceipt|RefundInterceptor - Delivery Failed
08-Sep-2010 08:45:13,321|919126370177|subscription_app|BEA1-607101D09CBD|NotifySmsDeliveryReceipt|Response Parameters:[Result:Success]
08-Sep-2010 08:45:13,422|7396043749|subscription_app|-7932740d%3A12aedfb6d15%3A-3d47|ChargeAmount|Request Params:[Address:tel:7396043749,ChargingInformation:[Code:,Currency:INR,Description: Retrieve-Balance ,Amount:0.0],ReferenceCode:balanceEnquiry:true;subsChannel:Unknown;pricePtAvl:true;transactionId:-7932740d%3A12aedfb6d15%3A-3d47;channelType:Subscription;eventType:subscription;contentName:;contentType:;senderMSISDN:;contentId:4945;cpID:;serviceId:CR03;cpName:;Circle_Name:AP;Circle_ID:2;isRated:Yes;productName:VAS0003ALL;basePrice:0.0;subsType:RECURRING;Sub_Profile:Pre-Paid]
08-Sep-2010 08:45:13,422|7396043749|subscription_app|-7932740d%3A12aedfb6d15%3A-3d47|ChargeAmount|ValidateMSISDNInterceptor - msisdn to be validated 7396043749
08-Sep-2010 08:45:13,423|7396043749|subscription_app|-7932740d%3A12aedfb6d15%3A-3d47|ChargeAmount|ValidateMSISDNInterceptor - validation status success
08-Sep-2010 08:45:13,424|7396043749|subscription_app|-7932740d%3A12aedfb6d15%3A-3d47|ChargeAmount|SubscriberProfileInterceptor - parameter in the request {arg0.referenceCode=;balanceEnquiry:true;subsChannel:Unknown;channelType:Subscription;transactionId:-7932740d%3A12aedfb6d15%3A-3d47;pricePtAvl:true;serviceId:CR03;Circle_Name:AP;Circle_ID:2;eventType:subscription;isRated:Yes;productName:VAS0003ALL;basePrice:0.0;contentId:4945;Sub_Profile:Pre-Paid;subsType:RECURRING, arg0.endUserIdentifier=tel:7396043749, arg0.charge.description= Retrieve-Balance , arg0.charge.currency=INR, arg0.charge.code=, arg0.charge.amount=0.0}
08-Sep-2010 08:45:13,424|7396043749|subscription_app|-7932740d%3A12aedfb6d15%3A-3d47|ChargeAmount|SubscriberProfileInterceptor - subscriber details fetched sucessfully- {arg0.referenceCode=;balanceEnquiry:true;subsChannel:Unknown;channelType:Subscription;transactionId:-7932740d%3A12aedfb6d15%3A-3d47;pricePtAvl:true;serviceId:CR03;Circle_Name:AP;Circle_ID:2;eventType:subscription;isRated:Yes;productName:VAS0003ALL;basePrice:0.0;contentId:4945;Sub_Profile:Pre-Paid;subsType:RECURRING, arg0.endUserIdentifier=7396043749, arg0.charge.description= Retrieve-Balance , arg0.charge.currency=INR, arg0.charge.code=, arg0.charge.amount=0.0, refCodeMap={balanceEnquiry=true, subsChannel=Unknown, channelType=Subscription, transactionId=-7932740d%3A12aedfb6d15%3A-3d47, pricePtAvl=true, eventType=subscription, contentId=4945, serviceId=CR03, Circle_Name=AP, Circle_ID=2, isRated=Yes, productName=VAS0003ALL, basePrice=0.0, subsType=RECURRING, Sub_Profile=Pre-Paid}}
08-Sep-2010 08:45:13,424|7396043749|subscription_app|-7932740d%3A12aedfb6d15%3A-3d47|ChargeAmount|SEInterceptor - Subscription exists [No], ProductName [VAS0003ALL]
08-Sep-2010 08:45:13,424|7396043749|subscription_app|-7932740d%3A12aedfb6d15%3A-3d47|ChargeAmount|REInterceptor -  Is already Rated [Yes] RatedPrice [0.0]
08-Sep-2010 08:45:13,425|7396043749|subscription_app|-7932740d%3A12aedfb6d15%3A-3d47|ChargeAmount|ChargingInterceptor - subscriber details processed sucessfully- {arg0.referenceCode=balanceEnquiry:true;subsChannel:Unknown;channelType:Subscription;transactionId:-7932740d%3A12aedfb6d15%3A-3d47;pricePtAvl:true;eventType:subscription;contentId:4945;serviceId:CR03;Circle_Name:AP;Circle_ID:2;isRated:Yes;productName:VAS0003ALL;basePrice:0.0;subsType:RECURRING;Sub_Profile:Pre-Paid, arg0.endUserIdentifier=7396043749, arg0.charge.description= Retrieve-Balance , arg0.charge.currency=INR, arg0.charge.code=, arg0.charge.amount=0.0}
08-Sep-2010 08:45:13,426|7396043749|subscription_app|-7932740d%3A12aedfb6d15%3A-3d47|ChargeAmount|CustomCDRInterceptor - CDR Info[Optional_Field1:,Subscription_Channel:Unknown,Optional_Field2:,Transaction_ID:,Content_ID:4945,IMEI:,Product_Name:VAS0003ALL,PPL_FLAG:,Charge_Code:,Base_Price:0.0,CustomerID:B_18366224,Circle_Name:AP,Sender_MSISDN:,IMSI:405819121019296,Content_Status:,Location:AP,Circle_ID:2,Original_Content_Owner_ID:,CPNAME:default_provider,Content_Price:0.0,Zone:Default,Content_Name:,Static_ID:AP#17099468,External_Correlation_Id:-7932740d%3A12aedfb6d15%3A-3d47,Subscription_Type:RECURRING,MSISDN:7396043749,Transaction_Mode:Subscription,Transaction_DateTime:2010-09-08 08:45:13 GMT+05:30,Content_Type:,Sub_Profile:Pre-Paid,CPID:,Other_Info:]
08-Sep-2010 08:45:13,427|7396043749|subscription_app|-7932740d%3A12aedfb6d15%3A-3d47|ChargeAmount|GetBalance|PaymentPlugin-Request -  Get User Balance of: 7396043749
08-Sep-2010 08:45:13,566|9058332533|subscription_app|3cf8ebf7%3A12aee0ad9f7%3A-2913|ChargeAmount|GetBalance|PaymentPlugin-Response -  Retrieved Balance Bucket: 1;20091003;20101225;42.00;|
08-Sep-2010 08:45:13,566|9058332533|subscription_app|3cf8ebf7%3A12aee0ad9f7%3A-2913|ChargeAmount|Exception: [Message:null]
08-Sep-2010 08:45:13,588|9058332533|subscription_app|3cf8ebf7%3A12aee0ad9f7%3A-2912|ChargeAmount|Request Params:[Address:tel:9058332533,ChargingInformation:[Code:,Currency:INR,Description: Retrieve-Balance ,Amount:0.0],ReferenceCode:balanceEnquiry:true;subsChannel:Unknown;pricePtAvl:true;transactionId:3cf8ebf7%3A12aee0ad9f7%3A-2912;channelType:Subscription;eventType:subscription;contentName:;contentType:;senderMSISDN:;contentId:4945;cpID:;serviceId:CR03;cpName:;Circle_Name:UK;Circle_ID:18;isRated:Yes;productName:VAS0003ALL;basePrice:0.0;subsType:RECURRING;Sub_Profile:Pre-Paid]
08-Sep-2010 08:45:13,588|9058332533|subscription_app|3cf8ebf7%3A12aee0ad9f7%3A-2912|ChargeAmount|ValidateMSISDNInterceptor - msisdn to be validated 9058332533
08-Sep-2010 08:45:13,589|9058332533|subscription_app|3cf8ebf7%3A12aee0ad9f7%3A-2912|ChargeAmount|ValidateMSISDNInterceptor - validation status success
08-Sep-2010 08:45:13,589|9058332533|subscription_app|3cf8ebf7%3A12aee0ad9f7%3A-2912|ChargeAmount|SubscriberProfileInterceptor - parameter in the request {arg0.referenceCode=;balanceEnquiry:true;subsChannel:Unknown;channelType:Subscription;transactionId:3cf8ebf7%3A12aee0ad9f7%3A-2912;pricePtAvl:true;serviceId:CR03;Circle_Name:UK;Circle_ID:18;eventType:subscription;isRated:Yes;productName:VAS0003ALL;basePrice:0.0;contentId:4945;Sub_Profile:Pre-Paid;subsType:RECURRING, arg0.endUserIdentifier=tel:9058332533, arg0.charge.description= Retrieve-Balance , arg0.charge.currency=INR, arg0.charge.code=, arg0.charge.amount=0.0}
08-Sep-2010 08:45:13,590|9058332533|subscription_app|3cf8ebf7%3A12aee0ad9f7%3A-2912|ChargeAmount|SubscriberProfileInterceptor - subscriber details fetched sucessfully- {arg0.referenceCode=;balanceEnquiry:true;subsChannel:Unknown;channelType:Subscription;transactionId:3cf8ebf7%3A12aee0ad9f7%3A-2912;pricePtAvl:true;serviceId:CR03;Circle_Name:UK;Circle_ID:18;eventType:subscription;isRated:Yes;productName:VAS0003ALL;basePrice:0.0;contentId:4945;Sub_Profile:Pre-Paid;subsType:RECURRING, arg0.endUserIdentifier=9058332533, arg0.charge.description= Retrieve-Balance , arg0.charge.currency=INR, arg0.charge.code=, arg0.charge.amount=0.0, refCodeMap={balanceEnquiry=true, subsChannel=Unknown, channelType=Subscription, transactionId=3cf8ebf7%3A12aee0ad9f7%3A-2912, pricePtAvl=true, eventType=subscription, contentId=4945, serviceId=CR03, Circle_Name=UK, Circle_ID=18, isRated=Yes, productName=VAS0003ALL, basePrice=0.0, subsType=RECURRING, Sub_Profile=Pre-Paid}}
08-Sep-2010 08:45:13,590|9058332533|subscription_app|3cf8ebf7%3A12aee0ad9f7%3A-2912|ChargeAmount|SEInterceptor - Subscription exists [No], ProductName [VAS0003ALL]
08-Sep-2010 08:45:13,590|9058332533|subscription_app|3cf8ebf7%3A12aee0ad9f7%3A-2912|ChargeAmount|REInterceptor -  Is already Rated [Yes] RatedPrice [0.0]
08-Sep-2010 08:45:13,590|9058332533|subscription_app|3cf8ebf7%3A12aee0ad9f7%3A-2912|ChargeAmount|ChargingInterceptor - subscriber details processed sucessfully- {arg0.referenceCode=balanceEnquiry:true;subsChannel:Unknown;channelType:Subscription;transactionId:3cf8ebf7%3A12aee0ad9f7%3A-2912;pricePtAvl:true;eventType:subscription;contentId:4945;serviceId:CR03;Circle_Name:UK;Circle_ID:18;isRated:Yes;productName:VAS0003ALL;basePrice:0.0;subsType:RECURRING;Sub_Profile:Pre-Paid, arg0.endUserIdentifier=9058332533, arg0.charge.description= Retrieve-Balance , arg0.charge.currency=INR, arg0.charge.code=, arg0.charge.amount=0.0}
08-Sep-2010 08:45:13,592|9058332533|subscription_app|3cf8ebf7%3A12aee0ad9f7%3A-2912|ChargeAmount|CustomCDRInterceptor - CDR Info[Optional_Field1:,Subscription_Channel:Unknown,Optional_Field2:,Transaction_ID:,Content_ID:4945,IMEI:,Product_Name:VAS0003ALL,PPL_FLAG:,Charge_Code:,Base_Price:0.0,CustomerID:B_11837543,Circle_Name:UK,Sender_MSISDN:,IMSI:405818120677947,Content_Status:,Location:UK,Circle_ID:18,Original_Content_Owner_ID:,CPNAME:default_provider,Content_Price:0.0,Zone:,Content_Name:,Static_ID:UK#11861962,External_Correlation_Id:3cf8ebf7%3A12aee0ad9f7%3A-2912,Subscription_Type:RECURRING,MSISDN:9058332533,Transaction_Mode:Subscription,Transaction_DateTime:2010-09-08 08:45:13 GMT+05:30,Content_Type:,Sub_Profile:Pre-Paid,CPID:,Other_Info:]
08-Sep-2010 08:45:13,592|9058332533|subscription_app|3cf8ebf7%3A12aee0ad9f7%3A-2912|ChargeAmount|GetBalance|PaymentPlugin-Request -  Get User Balance of: 9058332533
08-Sep-2010 08:45:13,716|7870420289|subscription_app||SendSms|Request Params:[Address:tel:7870420289,Message:Dear Subscriber You are currently subsribed to My Tunes. Please recharge your account to continue getting this service.,SenderName:52211,ChargingInformation:[],SimpleReference:[],X-Params:[]]
08-Sep-2010 08:45:13,716|7870420289|subscription_app||SendSms|ValidateMSISDNInterceptor - msisdn to be validated 7870420289
08-Sep-2010 08:45:13,717|7870420289|subscription_app||SendSms|ValidateMSISDNInterceptor - validation status success
08-Sep-2010 08:45:13,717|7870420289|subscription_app|BEA1-4EC6FC67DA22|SendSms|Request Params:[Address:tel:7870420289,Message:Dear Subscriber You are currently subsribed to My Tunes. Please recharge your account to continue getting this service.,SenderName:52211,ChargingInformation:[],SimpleReference:[Correlator:BEA1-4EC6FC67DA22,InterfaceName:null,EndPoint:http://172.30.16.226:9001/CPAdapter/SmsNotification],X-Params:[]]
08-Sep-2010 08:45:13,717|7870420289|subscription_app|BEA1-4EC6FC67DA22|SendSms|AddAppCallBackAndCorrelatorInterceptor - Correlator:BEA1-4EC6FC67DA22,CallBackURL:http://172.30.16.226:9001/CPAdapter/SmsNotification
08-Sep-2010 08:45:13,717|7870420289|subscription_app|BEA1-4EC6FC67DA22|SendSms|PrefixCountryCodeInterceptor - MSISDN after prefixing countrycode tel:917870420289
08-Sep-2010 08:45:13,724|7870420289|subscription_app|BEA1-4EC6FC67DA22|SendSms|Response Parameters:[Result:02063471283915713002621-1144493704]
08-Sep-2010 08:45:13,890|9060229396|subscription_app|-7932740d%3A12aedfb6d15%3A-3d44|ChargeAmount|Request Params:[Address:tel:9060229396,ChargingInformation:[Code:,Currency:INR,Description: Charge-Amount ,Amount:20.0],ReferenceCode:subsChannel:BULK-CRBT;transactionId:-7932740d%3A12aedfb6d15%3A-3d44;channelType:Renewal;pricePtAvl:true;eventType:subscription;contentName:;contentType:;senderMSISDN:;contentId:4945;cpID:;serviceId:CR03;cpName:;Circle_Name:KA;Circle_ID:9;isRated:Yes;productName:VAS0003ALL;basePrice:40.0;subsType:RECURRING;Sub_Profile:Pre-Paid]
08-Sep-2010 08:45:13,891|9060229396|subscription_app|-7932740d%3A12aedfb6d15%3A-3d44|ChargeAmount|ValidateMSISDNInterceptor - msisdn to be validated 9060229396
08-Sep-2010 08:45:13,892|9060229396|subscription_app|-7932740d%3A12aedfb6d15%3A-3d44|ChargeAmount|ValidateMSISDNInterceptor - validation status success
08-Sep-2010 08:45:13,892|9060229396|subscription_app|-7932740d%3A12aedfb6d15%3A-3d44|ChargeAmount|SubscriberProfileInterceptor - parameter in the request {arg0.referenceCode=;subsChannel:BULK-CRBT;pricePtAvl:true;channelType:Renewal;transactionId:-7932740d%3A12aedfb6d15%3A-3d44;serviceId:CR03;Circle_Name:KA;Circle_ID:9;eventType:subscription;isRated:Yes;productName:VAS0003ALL;basePrice:40.0;contentId:4945;Sub_Profile:Pre-Paid;subsType:RECURRING, arg0.endUserIdentifier=tel:9060229396, arg0.charge.description= Charge-Amount , arg0.charge.currency=INR, arg0.charge.code=, arg0.charge.amount=20.0}
08-Sep-2010 08:45:13,892|9060229396|subscription_app|-7932740d%3A12aedfb6d15%3A-3d44|ChargeAmount|SubscriberProfileInterceptor - subscriber details fetched sucessfully- {arg0.referenceCode=;subsChannel:BULK-CRBT;pricePtAvl:true;channelType:Renewal;transactionId:-7932740d%3A12aedfb6d15%3A-3d44;serviceId:CR03;Circle_Name:KA;Circle_ID:9;eventType:subscription;isRated:Yes;productName:VAS0003ALL;basePrice:40.0;contentId:4945;Sub_Profile:Pre-Paid;subsType:RECURRING, arg0.endUserIdentifier=9060229396, arg0.charge.description= Charge-Amount , arg0.charge.currency=INR, arg0.charge.code=, arg0.charge.amount=20.0, refCodeMap={subsChannel=BULK-CRBT, pricePtAvl=true, channelType=Renewal, transactionId=-7932740d%3A12aedfb6d15%3A-3d44, eventType=subscription, contentId=4945, serviceId=CR03, Circle_Name=KA, Circle_ID=9, isRated=Yes, productName=VAS0003ALL, basePrice=40.0, subsType=RECURRING, Sub_Profile=Pre-Paid}}
08-Sep-2010 08:45:13,893|9060229396|subscription_app|-7932740d%3A12aedfb6d15%3A-3d44|ChargeAmount|SEInterceptor - Subscription exists [No], ProductName [VAS0003ALL]
08-Sep-2010 08:45:13,893|9060229396|subscription_app|-7932740d%3A12aedfb6d15%3A-3d44|ChargeAmount|REInterceptor -  Is already Rated [Yes] RatedPrice [20.0]
08-Sep-2010 08:45:13,893|9060229396|subscription_app|-7932740d%3A12aedfb6d15%3A-3d44|ChargeAmount|ChargingInterceptor - subscriber details processed sucessfully- {arg0.referenceCode=subsChannel:BULK-CRBT;pricePtAvl:true;channelType:Renewal;transactionId:-7932740d%3A12aedfb6d15%3A-3d44;eventType:subscription;contentId:4945;serviceId:CR03;Circle_Name:KA;Circle_ID:9;isRated:Yes;productName:VAS0003ALL;basePrice:40.0;subsType:RECURRING;Sub_Profile:Pre-Paid, arg0.endUserIdentifier=9060229396, arg0.charge.description= Charge-Amount , arg0.charge.currency=INR, arg0.charge.code=, arg0.charge.amount=20.0}

Quote:
Originally Posted by rdcwayx
give some sample of file:

Code:
/opt/bea/ocsg_4.1/logs/customlogs/App_OP.log.$Ydate

---------- Post updated at 11:38 PM ---------- Previous update was at 11:19 PM ----------

Code:
Ydate=`date -d'-1 days' +'%Y-%m-%d'`
shortcodes=( "56882" "58585" "58888" "57575" "57677" );
for shortcode in ${shortcodes[@]}
do
        echo "--------------------------";
        echo $shortcode;
#        echo "series count";
#        grep "ShortCode=tel:${shortcode}" /opt/bea/ocsg_4.1/logs/customlogs/App_OP.log.$Ydate | awk -F"|" '{ arr[substr($2,1,4)]++ } END { for( no in arr) { print no , arr[no] } }'
        awk -v s=$shortcode -F"|" '$0~"ShortCode=tel:" s {print substr($2,1,4)} > tmp.log
        awk 'NR==FNR{a[$1]=$2;next}
               { if (a[$1]=="North") North++
                 if (a[$1]=="South") South++}
               END {  print "North", North; print "South", South}
              ' master.txt tmp.log 
done

# 4  
Old 09-08-2010
I don't see the string "ShortCode=tel:" in your sample file.
# 5  
Old 09-08-2010
Question Mapping with series from master file and calculate count

Hi rdcwayx,

The above is the sample text in the file and the lines containing "ShortCode=tel:" are as follows:
Code:
08-Sep-2010 06:25:13,790|BJ#18774093|phtunes_app|1283544417589|NotifySmsReception|CP URL to be called : http://172.30.24.52/unitech_sms/unit...5027&ContentID=
08-Sep-2010 06:25:22,065|8923686645|ingames_off_app|1282497011910|NotifySmsReception|CP URL to be called : http://122.170.122.198/uninor/Triger...IN,1,IN,146530
08-Sep-2010 06:25:25,087|TN#18535122|phtunes_app|1283544417589|NotifySmsReception|CP URL to be called : http://172.30.24.52/unitech_sms/unit...5043&ContentID=
08-Sep-2010 06:25:32,892|9173004391|aclwireless_app|1282498070897|NotifySmsReception|CP URL to be called : http://203.122.58.164/uninorintegrat...OIN%20TIGERWEB
08-Sep-2010 06:25:35,764|UK#13410667|phtunes_app|1283544417589|NotifySmsReception|CP URL to be called : http://172.30.24.52/unitech_sms/unit...5056&ContentID=
08-Sep-2010 06:25:54,890|UK#22838630|phtunes_app|1283544417589|NotifySmsReception|CP URL to be called : http://172.30.24.52/unitech_sms/unit...5067&ContentID=
08-Sep-2010 06:25:58,736|7398952682|aclwireless_app|1282498070897|NotifySmsReception|CP URL to be called : http://203.122.58.164/uninorintegrat...IN%20CUTEPRIYA
08-Sep-2010 06:25:59,728|8923686645|ingames_off_app|1282497011910|NotifySmsReception|CP URL to be called : http://122.170.122.198/uninor/Triger...IN,1,IN,146530
08-Sep-2010 06:26:08,146|7398952682|aclwireless_app|1282498070897|NotifySmsReception|CP URL to be called : http://203.122.58.164/uninorintegrat...N%20CUTE_PRIYA
08-Sep-2010 06:26:19,274|UP#23845782|phtunes_app|1283544417589|NotifySmsReception|CP URL to be called : http://172.30.24.52/unitech_sms/unit...5077&ContentID=

Quote:
Originally Posted by rdcwayx
I don't see the string "ShortCode=tel:" in your sample file.
# 6  
Old 09-08-2010
I am confused.

In your first code,

Code:
grep "ShortCode=tel:${shortcode}" /opt/bea/ocsg_4.1/logs/customlogs/App_OP.log.$Ydate

it will get all lines with string ShortCode=tel:XXXXXX, but I still don't see the string ShortCode=tel: in your above sample.
# 7  
Old 09-08-2010
Question Mapping with series from master file and calculate count

Hi rdcwayx,

The complete URL is not printed in the previous post
You can click on any of the URL and see the parameters containing "ShortCode=tel:"
For your convinience i am trying to copy one more line from logs containing "ShortCode=tel:" as follow:
Code:
08-Sep-2010 00:52:44,145|9172482043|viacom18_app|1282498050499|NotifySmsReception|CP URL to be called : http://203.122.58.164/uninorintegration/triggerdelivery?ShortCode=tel:56882&Keyword=&sId=tel:9172482043&TransactionID=SDP-DM-31245960&ContentID=Kiss
08-Sep-2010 00:54:27,789|9172482043|viacom18_app|1282498050499|NotifySmsReception|CP URL to be called : http://203.122.58.164/uninorintegration/triggerdelivery?ShortCode=tel:56882&Keyword=&sId=tel:9172482043&TransactionID=SDP-DM-31246052&ContentID=Kiss%20imran%20farheen

Quote:
Originally Posted by rdcwayx
I am confused.

In your first code,

Code:
grep "ShortCode=tel:${shortcode}" /opt/bea/ocsg_4.1/logs/customlogs/App_OP.log.$Ydate

it will get all lines with string ShortCode=tel:XXXXXX, but I still don't see the string ShortCode=tel: in your above sample.

Last edited by poweroflinux; 09-08-2010 at 02:06 AM.. Reason: Complete logs are not printing
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Replacing 12 columns of one file by second file based on mapping in third file

i have a real data prod file with 80+ fields containing 1k -2k records. i have to extract say 12 columns out of this which are sensitive fields along with one primary key say SEQ_ID (like DOB,account no, name, SEQ_ID, govtid etc) in a lookup file. i have to replace these sensitive fields in... (11 Replies)
Discussion started by: megh12
11 Replies

2. UNIX Desktop Questions & Answers

How can I replicate master master and master master MySQL databse replication and HA?

I have an application desigend in PHP and MySQl running on apache web server that I is running on a Amazon EC2 server Centos. I want to implement the master-master and master slave replication and high availability disaster recovery on this application database. For this I have created two... (0 Replies)
Discussion started by: Palak Sharma
0 Replies

3. Shell Programming and Scripting

Search and replace with mapping from a mapper file in a target file

Hello, I have a special problem. I have a file in 8 bit and would like to convert the whole database to 16Bit unicode. The mapping file has the following structure: The mapper is provided as a zip file The target file to be converted contains data in English and 8 bit Urdu mapping, a... (4 Replies)
Discussion started by: gimley
4 Replies

4. Shell Programming and Scripting

Creating unique mapping from multiple mapping

Hello, I do not know if this is the right title to use. I have a large dictionary database which has the following structure: where a b c d e are in English and p q r s t are in a target language., the two separated by the delimiter =. What I am looking for is a perl script which will take... (5 Replies)
Discussion started by: gimley
5 Replies

5. Shell Programming and Scripting

Calculate age of a file | calculate time difference

Hello, I'm trying to create a shell script (#!/bin/sh) which should tell me the age of a file in minutes... I have a process, which delivers me all 15 minutes a new file and I want to have a monitoring script, which sends me an email, if the present file is older than 20 minutes. To do... (10 Replies)
Discussion started by: worm
10 Replies

6. Shell Programming and Scripting

Grep string from logs of last 1 hour on files of 2 different servers and calculate count

Hi, I am trying to grep a particular string from the files of 2 different servers without copying and calculate the total count of its occurence on both files. File structure is same on both servers and for reference as follows: 27-Aug-2010... (4 Replies)
Discussion started by: poweroflinux
4 Replies

7. Shell Programming and Scripting

Parse file from remote server to calculate count of string existence in that file

Hi I need to parse the file of same name which exist on different servers and calculate the count of string existed in both files. Say a file abc.log exist on 2 servers. I want to search for string "test" on both files and calculate the total count of search string's existence. For... (6 Replies)
Discussion started by: poweroflinux
6 Replies

8. Programming

Mapping all file at once or by page

This might be a silly question but I was wondering if, in case of huge files (2-3GB), it is more efficient to map the whole file at once, or to map it page by page. The file has to be processed sequentially from the start to the end. Thanks. (12 Replies)
Discussion started by: emitrax
12 Replies

9. Shell Programming and Scripting

calculate the average of time series data using AWK

Hi, I have two time series data (below) merged into a file. t1 and t2 are in unit of second I want to calculate the average of V1 every second and count how many times "1" in V2 is occur within a second Input File: t1 V1 t2 V2 10.000000... (5 Replies)
Discussion started by: nica
5 Replies
Login or Register to Ask a Question