954,515 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

sag.sh[11]: SAG: not found

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

sommer_queen
Newbie Poster
8 posts since Sep 2006
Reputation Points: 10
Solved Threads: 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.

sut
Light Poster
30 posts since Sep 2006
Reputation Points: 20
Solved Threads: 1
 

Hi,

Thank you . its working now .

sommer_queen
Newbie Poster
8 posts since Sep 2006
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You