What error do you get? At what line? Did you try running your script with set -x set?
The description you've given and the attached script are completely useless for your request, as that would require us to have exactly the same environment as you do to reproduce the error.
Not getting any result for which it has been build, I know there are errors in the script, but needs to identify. Below are the error-less result with null output.
We ain't psychic (although it would be nifty). What's the expected output? What do the command line switches mean? What's the format of the log file you're referencing?
Don't forget: we don't know where you work, what you do, what your environment is like, what this script should accomplish, what mood you're in today. You'll have to provide all information required to understand the problem or otherwise we won't really be able to help you beyond a few stabs in the dark that may or may not help.
Before script does execute the main function , it undergoes several stages to get the User Understandable Text output instead of typical XML format. This script was built to Isolate Error Transaction from bulky XMLlog and refine the Error's by its types.
Firstly the script does some searching of current and archived file provided by the user in Service Log Directory.Once the the search finds the file in the directory concurrently User wants Errors to be isolated from the found archived or current dated file. User provides the switch (-a) along with two arguments passed, one is date (yyyy-mm-dd) format and other argument is file (ap_managementServices). But archived files will be in a format of ap_managementServices_Group[1-5]-2011-04-03.log.gz. When user wants to isolate the errors from current day log, he/she will be passing just (-l) switch along with current day file ap_managementServices_Group[1-5] and all the errors logs irrespective of error type will be isolated and stored under ErrorLog Dir.
Note: [1-5] .. Is a range of log file.
Secondly the script does pure refining the error logs based on its type.There are different type of Errors based on Application design. For example, we have Client.404 , Client.700 , Client.705 for client based errors, similarly for Server bound Error we have Server.500, Server.501, Server.502.
Each error code has its own specification .So we have placed these Client & Server codes (In ClientErr & ServerErr) as search string for the script when user opts any one of the options (-c) & (-s). Below is the result in a un-formatted way.
Code:
Client.404 91 The authorization or verification request was declined. : nvalid CC Number
Server.500 6 The authorization or verification request was declined. : Unidentifiable Error
Server.502 2 The authorization or verification request was declined. : Unable to determine | The error because of invalid response code!
Client.705 7 The authorization or verification request was declined. : Processor Decline
Server.501 12 The authorization or verification request was declined. : No Account
Client.400 11 The authorization or verification request was declined. : Lost/Stolen
Thirdly the script gets the results from above procedure and store it in other file, to display it in a Proper table format. Below is the result.
Code:
------------------------------------------------------------------------------------------------
Error Code |Count| Error Description
------------------------------------------------------------------------------------------------
Client.404 | 91 | The authorization or verification request was declined. : nvalid CC Number
Server.500 | 6 | The authorization or verification request was declined. : Unidentifiable Error
Server.502 | 2 | The authorization or verification request was declined. : Unable to determine
Client.705 | 7 | The authorization or verification request was declined. : Processor Decline
Server.501 | 12 | The authorization or verification request was declined. : No Account
Client.400 | 11 | The authorization or verification request was declined. : Lost/Stolen
-------------------------------------------------------------------------------------------------
Hi,
So I downloaded this kernel source and was able to build it successfully.
But I want to add this SDK source code inside, can anyone help me how to do this? Note that the SDK source can be built by itself.
I added the SDK in the main Makefile:
init-y := init/
#added SDK... (0 Replies)
Help. My script is working fine when executed manually but the cron seems not to catch up the command when registered.
The script is as follow:
#!/bin/sh
for file in file_1.txt file_2.txt file_3.txt
do
awk '{ print "0" }' $file > tmp.tmp
mv tmp.tmp $file
done
And the cron... (2 Replies)
Hello,
I am facing a very strange problem when I run my script manuallu ./Fetchcode which is using to connect with MKS integrity from linux end it workks fine but when I run it from cron it doesn't work.Can someone help me
1) How could I check my script when it is running from cron like... (3 Replies)
it asks for password and then following is displayed
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Couldn't find package build-essential
what should i do to install g++ compiler? (4 Replies)
Hi All
I am trying to build a script that will take data from a tab separated file and use that to split up a quicktime file. So far the code is as follows
#!/bin/sh
#test parsing of data
#fix excel file output returns
cat $1 | tr "\r" "\n" > $1.fix
printf "\n" >> $1.fix
mv $1.fix $1
... (3 Replies)
Hi,
I made a build script for the product I am working on.
The script was made in the /bin/sh shell.
My first line in the script (after the #! /bin/sh and following # lines ) were,
if ; then
/bin/sh
fi;
It works well with my sh shell. I run the script as
sh build.sh
Now I... (9 Replies)
I have this script
sed -e '$q' -e 's/I/D/g' <inputfile> outfile
which replaces I by D...
I have to run this script in 90 files which their filename starts with CD*. I want to call all these files and execute this command once.
Or schedule it to be executed at 1600hrs every day.
I want... (7 Replies)
I have a 3 status option 1 , 4 , 6
1 - Active
4 - Temp..
6 - Deactive
I want to build a script which when it finds either of the status options (1,4,6), then returns the relevant string.
txs
:confused: (3 Replies)
I have file which has "A" character in more than 1000 lines and I want replace this "A" with "f". There is also "A" which I don't want to replace at the last line.
Currently, I use this script to replace them one by one
:g/A/s//f/g
Regards (2 Replies)