runing script with log level 4


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting runing script with log level 4
# 1  
Old 04-15-2009
Error runing script with log level 4

i have bash script with some batches, and when i putt log level 4 in script i get error while executing or if i rung script.sh with parameter log level 4.

i appriciate some advice Smilie

Last edited by unknown1; 04-15-2009 at 07:11 AM..
# 2  
Old 04-15-2009
There is no such general thing as "log level <n>" in shell scripting. That is a parameter/option/switch/argument this shell script takes to assumingly produce more verbose output of what it does or can't do.
Show your script and use CODE TAGS when posting it!
# 3  
Old 04-15-2009
Quote:
Originally Posted by zaxxon
There is no such general thing as "log level <n>" in shell scripting. That is a parameter/option/switch/argument this shell script takes to assumingly produce more verbose output of what it does or can't do.
Show your script and use CODE TAGS when posting it!
manualy i can do taht like this:

Code:
BATCH_LOG_LEVEL=4 script1.sh

but how can i get log level 4 in script, or is some othar way?

Code:
#! /bin/sh

#Check batch for RC=100 or RC=104
chk_rc_100_104() {
        ret_code=$?
        if [ "$ret_code" != "100" ]
          then
             if [ "$ret_code" != "104" ]
                then
                       echo "!!!!!"
                                     echo "Batch is not finished"
                    echo "Ret_code = ${ret_code} for $BATCH"
                    echo "!!!!!"
            exit $ret_code
        fi 
        fi
}

CMD="/app/something/other/script1.sh"
echo ""
$CMD
chk_rc_100_104

CMD="/app/something/other/script2.sh"
echo ""
$CMD
chk_rc_100_104

echo "Batch chain is finished"

# 4  
Old 04-15-2009
This script is only starting those 2 other scripts and is presenting their return codes etc. It doesn't take any digit as log level. It also doesn't work with the variable "BATCH_LOG_LEVEL."
Maybe you check the other 2 scripts for that "BATCH_LOG_LEVEL" but since it isn't even exported none of the other 2 scripts will notice that "BATCH_LOG_LEVEL" neither.
Maybe you have to export it first and try again.
If nothing helps I recommend to ask the guy that wrote those scripts what to do.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Getting error while runing the script

While running the script it is failing while searching the pattern if the pattern is found then it is running fine if the pattern is not found it terminate with error my requirement is if the pattern is not found then it exit successfully. cat $INTE/CTY_${DATE}_cn_ar.*|cut -c 1-100|grep... (3 Replies)
Discussion started by: jagu
3 Replies

2. Red Hat

SSL certificate generation on OS level or application level

We have a RHEL 5.8 server at the production level and we have a Java application on this server. I know of the SSL certificate generation at the OS (RHEL) level but it is implemented on the Java application by our development team using the Java keytool. My doubt is that is the SSL generation can... (3 Replies)
Discussion started by: RHCE
3 Replies

3. Red Hat

RHCS debug log level

Hi everyone, Can you help me on how to set up the debug level of RHCS? I need more information on the cluster.log so that i can futher troubleshoot our problem being encontered now. Thanks.:) (1 Reply)
Discussion started by: shtobias
1 Replies

4. UNIX for Dummies Questions & Answers

How to change the log level for cron?

Hello, I'm wondering how to change the log level to level 2 for cron without manually have to restart it with every boot. I didn't thing this would be hard to find, but searching has cause me to come up empty. System is Ubuntu Karmic/9.10 With thanks, Narnie (6 Replies)
Discussion started by: Narnie
6 Replies

5. Solaris

Difference between run level & init level

what are the major Difference Between run level & init level (2 Replies)
Discussion started by: rajaramrnb
2 Replies

6. Shell Programming and Scripting

Need a help Please- runing the perderabos script datecalc

i have a script in bourne called cdrsnokia.sh and inside of it calls a script called resta_dias where it calls the datecalc script (perderabos date calculator). The purpose is to rest (-) one day arithmetical operation the content of each line and the result is passed to another file lista2;after... (1 Reply)
Discussion started by: alexcol
1 Replies

7. UNIX for Dummies Questions & Answers

Help on runing a script

:confused: Hello group, Let me explain a little, I´m running under HP UX 11.i SO. I need to put on the server via FTP a file with the following attributes: -r--r--r-- this is read for all. Also I tried using inet.conf to change the umask for ftp and works perfect on giving the permissions for... (1 Reply)
Discussion started by: mig28mx
1 Replies

8. UNIX for Dummies Questions & Answers

runing a script as superuser

My first post: in /etc/rc2.d i have a startup script: Script1. if you run #>scirpt1 stop/start from any user other than root you will get u must be supper user to run this script. eventhough the rights are 777. Question: how can i get my user_a be able to run this script to stop and start it... (2 Replies)
Discussion started by: bcheaib
2 Replies

9. UNIX for Dummies Questions & Answers

do i need this runing ?

1. Do I need syslog running in my services? 2. Is there such a critter for counterstrike installer for linux or do i need to use winex (2 Replies)
Discussion started by: amicrawler2000
2 Replies

10. UNIX for Dummies Questions & Answers

process runing automatically

Hi, I need some help, because I'm trying to create a process runing all the time (not invoqued by a crontab), like a daemon, to detect the creation of a new file in a specific directory and axecute a process wich do something with this new file. Can you help me? For your information my Unix is... (2 Replies)
Discussion started by: lsquillacioti
2 Replies
Login or Register to Ask a Question