LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 03-14-2005, 04:16 PM   #1
Grassie Coetzee
LQ Newbie
 
Registered: Mar 2005
Posts: 5

Rep: Reputation: 0
Question command from shell script notworking


When executing the following script:


#!/bin/bash
#PATH=$PATH:/opt/oracle/bin
PATH=/usr/opt/oracle/bin
export PATH
ORACLE_HOME=/opt/oracle/
export ORACLE_HOME
ORACLE_SID=avrs
export ORACLE_SID


/usr/opt/oracle/bin/sqlplus arts02/virtual << !
@/usr/cdudata/tt.sql
exit
!

I get the following response:

./do_sql: 134871112: Permission denied

All the permissions are correct. If I replace the sqlplus command with ls then I get a similar response. I do have access & permition for all commands & directories.

Can somebody please help.
 
Old 03-14-2005, 04:39 PM   #2
Komakino
Senior Member
 
Registered: Feb 2004
Location: Somerset, England
Distribution: Slackware 10.2, Slackware 10.0, Ubuntu 9.10
Posts: 1,938

Rep: Reputation: 53
Have you made the script executable?
Does: sh do_sql
get the same result?

Oh, and for consiseness's sake, you can put the export in front of the variable name each time, i.e.:
export PATH=$PATH:/opt/bin
etc
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
running shell script: command not found tripat Red Hat 3 04-14-2010 01:21 PM
Executing a shell script command!! vishamr2000 Programming 4 08-15-2005 12:33 AM
Command in shell script Grassie Coetzee Linux - Software 1 03-13-2005 11:42 AM
command not found (My shell script) Swift&Smart Linux - Software 3 05-15-2004 11:14 PM
Shell script login command? chup Linux - General 3 08-24-2003 06:43 PM


All times are GMT -5. The time now is 08:37 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration