Jay Roy
asked on
bash scripting newbie
hi guys
I am new to bash shell scripting and have a few questions. I am from a java background.
Below is my customer.sh file which invokes the customer.jar
1. I want to modify my customer.sh file so i do
$ vi customer.sh
but it does not allow me to modify(it is read only), any idea why?
How can i make it editable?
customer.sh
Any help will be greatly appreciated
thanks
I am new to bash shell scripting and have a few questions. I am from a java background.
Below is my customer.sh file which invokes the customer.jar
1. I want to modify my customer.sh file so i do
$ vi customer.sh
but it does not allow me to modify(it is read only), any idea why?
How can i make it editable?
customer.sh
#!/bin/bash
export JAVA_HOME=/javaProj/jdk/1.6.0_22
export PATH=$JAVA_HOME/bin:$PATH:$LD_LIBRARY_PATH # I am not sure what is $PATH:$LD_LIBRARY_PATH , any idea
export CLASSPATH=$CLASSPATH:$ROOT # I am not sure what is $CLASSPATH, any idea
export ROOT=/project/customer/customerAutomated
touch $ROOT/customer.log # does touch means it creates a file?
chmod 0777 $ROOT/customer.log
logAutos=$ROOT/autosys.log
emailFailFile=$ROOT/emailfail.txt
emailSubject="ERROR:- customer Status on `date`"
sendtotargetName="jacks@humpingtree.com"
echo " " ; echo "BEGIN TIME = `date`"
cd $ROOT
java -Dicg.env=prod -jar $ROOT/customer.jar 123 # any idea what this means 'java -Dicg.env=prod'
sleep 2 # this makes the program sleep for 2 seconds, right ?
#***************************************************************************
echo "Checking Logs..."
#***************************************************************************
if ( grep "Problem occurred" $logAutos );
then
echo "Alert: Problem occurred while updating customertables..."
echo "END TIME = `date`"
exit 1
fi
echo "END TIME = `date`"
exit 0
Any help will be greatly appreciated
thanks
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
can you please help me with the questions i posted with in the script?
thanks
thanks
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
ls -l customer.sh
-rwxrwxrwx 1 customerproj customerproj 1745 Jan 30 18:07 customer.sh
-rwxrwxrwx 1 customerproj customerproj 1745 Jan 30 18:07 customer.sh
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thanks guys
>> -Dproperty=value
Sets a system property value.
Can you tell me where i can find it ? where can i see my system properties?
Can i do a search on my system properties
thanks
>> -Dproperty=value
Sets a system property value.
Can you tell me where i can find it ? where can i see my system properties?
Can i do a search on my system properties
thanks
ASKER