![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| when executing .sh script in telnet error "script not found" | smiley | Shell Programming and Scripting | 1 | 04-22-2008 10:01 AM |
| Error in the script | krworks | Shell Programming and Scripting | 5 | 04-17-2008 10:31 PM |
| awk Shell Script error : "Syntax Error : `Split' unexpected | Herry | UNIX for Dummies Questions & Answers | 2 | 03-17-2008 08:16 AM |
| script error | MANISH KU | Shell Programming and Scripting | 5 | 09-01-2007 03:13 PM |
| error in awk script | rraajjiibb | Shell Programming and Scripting | 7 | 06-10-2004 04:37 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Script error
folks;
I wrote this script for our Solaris 10 to restart an application we have on reboot, but every time i run this script to test i get this message: then: then/endif not found Would any one help with that? thanks in advance Here's the script: #!/bin/sh # chkconfig: 3 60 30 # description: Starts and stops application mode=$1 TOMCAT_HOME=/opt/abc/apps CATALINA_HOME=/opt/abc/apps JAVA_HOME=/usr/jdk1.5.0_08 export TOMCAT_HOME CATALINA_HOME JAVA_HOME case "$mode" in 'start') # Start daemon su - devuser -c "$TOMCAT_HOME/bin/catalina.sh $mode" ;; 'stop') # Stop daemon. We use a signal here to avoid having to know the # root password. $TOMCAT_HOME/bin/catalina.sh $mode ;; *) # usage echo "usage: $0 start|stop" exit 1 ;; esac |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
you are probably getting the error from catalina.sh, not the startup script.
|
|
#3
|
|||
|
|||
|
But i didn't touch the script
|
|
#4
|
||||
|
||||
|
..yeah, but you are calling it.
Let's say I have a script called tester that calls a script named script2... Code:
# cat tester /opt/script2 # Code:
# cat /opt/script2
COUNT=0
if (( ${COUNT} < 3 )); then
echo "is bigger"
else
#
Code:
# ./tester /opt/script2[2]: syntax error at line 4 : `else' unmatched # |
||||
| Google The UNIX and Linux Forums |