Sponsored Content
Top Forums Shell Programming and Scripting Help building the logic for a script Post 302213071 by fahadaizaz on Wednesday 9th of July 2008 05:55:09 AM
Old 07-09-2008
@ quine

1) Is this all being recorded moment by moment in one file like a log, or are the "USE" records in a separate file?
Code:
Basically yes this is recorded moment by moment. But most of the time the file contains the polling information that is not required. 
Point is the file contains this data as well as other garbage stuff which is not required. 
Therefore you can consider the file as a static file which contains all the valid records and garbage values/lines.

2) It makes sense that if there is a USE record where there has been no line record it would be an error.
Code:
I can grep the data that i require into a seperate file meaning, the two lines
INFO line [ msisdn = 133762, bonus = 56284, total usage = 562842 ]

and

2008:07:08 07:03:20.655 (tid 4) INFO AIR credit operation success [ msisdn = 773210]

and do the processing.


3) Can you get two "line records" with the same msisdn without a USE record in between? If yes, you must account for this. How about the reverse? Two or mor uses for each recording? Either that is an error too, or you add up the credits or something, etc.
Code:
You see there is a chance that the two records INFO line and INFO AIR credit operation success may not match.
Because what i want to achieve is that the "recorded bonus (INFO line)" and the "credit operation success" are equal. 
if any thing is missing just put it into an error file.


4) What happens if a line record never gets used? That is, how long do you hold (store) un-used "line records" before they become errors (if they ever do)?
Code:
This is why i am creating this script to see that both operations that is recording of bonuses and posting them are consistant. 
Any descripencies could be seen in the error file.



@snowline84

The lines we need to check are:

INFO line
and
INFO AIR credit operation success
 

2 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Help required on building the logic

Hi, Can anyone please help me on building the logic for writing a shell script which can delete blank lines from a file and count the number of duplicate lines in a file. Thanks, Indra (2 Replies)
Discussion started by: igandu
2 Replies

2. Shell Programming and Scripting

Need help in building Unix script

Hi all, We have a requirement like we need to create a program which will change a particular string in the file. For example +=KA1238767 1121 3344645 686943 22356 01 567893 12435 12121 983627 121 1092 091217 02 may be for engine failure In the above file we need to change the bold string... (2 Replies)
Discussion started by: susant.igate
2 Replies
LR_ENVIRONMENT.IN(1)					  LogReport's Lire Documentation				      LR_ENVIRONMENT.IN(1)

NAME
lr_environment - Export Lire configuration in shell script form SYNOPSIS
eval `lr_environment` DESCRIPTION
The lr_environment command is used to import the Lire configuration in Lire shell scripts. All of Lire configuration variables will be written in a format that can be evaled by the shell. Shell scripts don't usually have to use that command, since it is done by the defaults file sourced by each command. The old names used by when the configuration was done in shell script are also exported by this script for backward compatibility. AUTHOR
Francis J. Lacoste <flacoste@logreport.org> VERSION
$Id: lr_environment.in,v 1.12 2006/07/23 13:16:33 vanbaal Exp $ COPYRIGHT
Copyright (C) 2003 Stichting LogReport Foundation LogReport@LogReport.org This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program (see COPYING); if not, check with http://www.gnu.org/copyleft/gpl.html. Lire 2.1.1 2006-07-23 LR_ENVIRONMENT.IN(1)
All times are GMT -4. The time now is 06:40 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy