The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How to stop a script running in remote server from local script mannepalli Shell Programming and Scripting 1 03-04-2009 08:18 PM
Running Perl script in TCL script dniz Shell Programming and Scripting 3 02-19-2009 05:06 PM
Running a Script/Executable From Within a Script modey3 UNIX for Dummies Questions & Answers 2 01-25-2009 01:34 PM
Running a script from script (bash) bobban Shell Programming and Scripting 1 12-26-2008 02:20 AM
Running from Shell Vs running from RC script vickylife SUN Solaris 2 07-31-2008 10:01 AM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 03-25-2009
Whiteboard's Avatar
Whiteboard Whiteboard is offline
Registered User
  
 

Join Date: Feb 2009
Location: @........
Posts: 111
Running the script as ./ and . ./

Hi All

Just have a doubt in running the script... I need to run two scripts... Am first running the setenv.sh as ./setenv.sh and the next script as ./script.sh.But after i run script.sh am getting an error as JAVA_HOME not set. I tried running the setenv.sh as . ./setenv.sh and ran ./script.sh and it does not give any error... am wondering what might be the problem...

Contents of setenv.sh
Code:
#!/bin/bash
export PATH=/home/test/142_16/bin:$PATH
export JAVA_HOME=/home/test/142_16
Contents of script.sh
Code:
#!/bin/bash
CLASSPATH=.:lib/classes12.jar:lib/SSEPrinthouseFeed.jar
if [ -n "$JAVA_HOME" ];then
   if [ -x "$JAVA_HOME/bin/java" ] ; then
        JAVACMD=$JAVA_HOME/bin/java
   else
      echo "$JAVA_HOME does not seem to contain an executable java - please check before running $0"
      exit 1
   fi
else
   echo "JAVA_HOME not set - ensure this is set correctly before running $0"
   exit 1
fi
./alert.sh
exit 0
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 02:52 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0