0

Hello everyone,

I am a beginner to shell script . I had to modify the following script and i get the following errors :
sag.sh[11]: SAG: not found
mv: cannot create /sag_0609131449.txt :Permission denied


#!/bin/ksh
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/export/home/oracle/app/oracle/product/8.1.7/lib
export LD_LIBRARY_PATH
export ORACLE_HOME=/export/home/oracle/app/oracle/product/8.1.7
export STOCK=/export/home/oracle/app/oracle/product/8.1.7/bin
export ENT=/home/atw11w99/ent/uc5
#SAG =$SAG:/home/atw11w99/ent/uc5/sag
SAG =/home/atw11w99/ent/uc5/sag
export SAG
#export VOKUS=\(DESCRIPTION\=\(ADDRESS\=\(COMMUNITY\=OEN.MCHH\)\(PROTOCOL\=TCP\)\(HOST\=MACH3.MCHH.SIEMENS.DE\)\(PORT\=1565\)\)\(CONNECT_DATA\=\(SID\=OMCP\)\)\)
DATUM=`date +%y%m%d%H%M`
export VOKUS=\(DESCRIPTION\=\(ADDRESS\=\(PROTOCOL\=TCP\)\(HOST\=139.21.204.196\)\(PORT\=1523\)\)\(CONNECT_DATA\=\(SID\=OMCP9\)\)\)
cd $ENT
$STOCK/sqlplus VKS#1/#vokus02@$VOKUS @sag.sql
cd $SAG

mv $ENT/sag.lst $SAG/sag_${DATUM}.txt

thank u for any help in advange

2
Contributors
2
Replies
3
Views
11 Years
Discussion Span
Last Post by sommer_queen
0

You've deleted a couple of lines before posting. The error is on line 8, not 11. Take the space out from between SAG and the equal sign in the environment variable assignment. That should solve the permission denied problem too.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.