This is the exact code... This code is not new for you..in my previous post i post the same code, but in that slight changes instead of AWK i am trying MYSQL it works well and reduced my problem,
but my curious is if any error happened in mysql queries how to make that error as log, need your guidance to solve this thread
Hmmm. I suspect if errors happen, it prints an error message to stderr.
Above all the queries, you could do
and all errors will be logged to that file. Unfortunately that doesn't tell you exactly which one had the error, or even if.
I don't understand why the || echo bits aren't being run. For some reason mysql must not be returning error when it fails to execute a statement. Maybe it's because of the here-document, try || ( echo "query failed" >> $LOG )
because this also not working
and i have another i doubt ,
suppose if one query not execute properly or throw error means how to stop the further process.
in this query i made a mistake instead of VARCHAR i used VARCHA
it show error but after this error its continously moving to next query.
i dont want like this once the error happened in any of the query then the next process is quit the script and triggered mail to admin the process stopped like that.
Is it possible ??
Thanks Corona688 as a senior your doing such a helpful to me and most of the beginners , and you are very down to earth character thanks a lot for your patience to read my bad english and understand my queries. :-)
Hi,
I need to develop a bash script to create customized report from the server log (red hat 5.8 64 bit Operating system). The following is one of the log for our internal application task.
<2015.03.03 20:09:52 274 +0800><I><DSCTH01><http-0.0.0.0-443-2><security> GUI request succeeded for... (1 Reply)
Hi All,
I am really struggling to solve this problem, this might be small but I am not able to, can somebody help me?
I have few directories and these directories receives text files in large amount with in fraction of seconds. So I just want to send all the files in current directory to... (2 Replies)
Hi,
I trust that you are well - I'm a bit new into AIX and I've been assigned a task to write a script that will always validate between our two Prod (Prod A and Prod B) environments to confirm which prod we live at. The two environments are exact replicas and this check I need to put in... (5 Replies)
Plese help I need a urgent requirement.
Ex: test.log
requirement : using shell script I need to archive the log file and nil and the content of (test.log) file to 0 kb
and then in the archive folder log files are name to test.tar
test1.tar
test2.tar
EX:
/home/abc/
test.log ... (1 Reply)
Hi Guys,
Im a newbie to scripting and have a small assignment. can someone please confirm if the script i have written would work fine as we dont have a test server to test :(
Scenario - copy 2 files from an ftp server (windows) to a linux machine (a perticular folder). run 2 different... (0 Replies)
I was going write a script from following site.
Unix Shell Script to Execute Oracle SQL Query (link removed)
My configuration setting for oracle XE.
export ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server
export PATH=$PATH:$ORACLE_HOME/bin
export ORACLE_SID=XE
but after... (4 Replies)
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
Write an automated shell program(s) that can create, monitor the log files and report the issues for matching... (0 Replies)
Hello everybody,
I need some help here to create a script to parse a log file. Here is a sample of the log file :
0x42258940 (Debug) Cache SUMMARY attrs now/668 min/668 max/668.
0x42258940 (Debug) RSVD SUMMARY reserved space max requested/128 MB accounted now/0 MB
0x42258940 (Debug)... (12 Replies)
hi,
How to create a log file of a script. Like spool does .
I want to create a log file of whatever the script is doing step wise.
like -xvf does or something better then that.
thanks ... (3 Replies)
hi all,
have a script which i am using to generate a log file. i use "touch out.log" command to create the file and later on i want to echo lines to this file.
for some reason it keeps giving me this error when i try and create the file ;
touch: out.log cannot create
i have... (3 Replies)