Dear Friends,
I have encounted the following error while I tried like this
> cat sample2.sh
#!/bin/sh
echo "SELECT username FROM dba_users;" >>$sqlstr
echo "EXIT" >>$sqlstr
echo $sqlstr
sqlplus system/manager@BHI @$sqlstr
>
I am executing it like
> sample2.sh
SELECT username FROM dba_users;
EXIT
SQL*Plus: Release 8.1.7.0.0 - Production on Sun Dec 19 13:51:26 2004
(c) Copyright 2000 Oracle Corporation. All rights reserved.
Connected to:
Oracle8i Enterprise Edition Release 8.1.7.0.0 - Production
With the Partitioning option
JServer Release 8.1.7.0.0 - Production
SP2-0310: unable to open file ""
SQL>
It struck here. I tried using this sqlplus system/manager@BHI `@$sqlstr`
then I get the following error
./sample2.sh: @: not found
SQL*Plus: Release 8.1.7.0.0 - Production on Sun Dec 19 13:57:33 2004
(c) Copyright 2000 Oracle Corporation. All rights reserved.
Connected to:
Oracle8i Enterprise Edition Release 8.1.7.0.0 - Production
With the Partitioning option
JServer Release 8.1.7.0.0 - Production
SQL>
I am following the script found at the following link as my example
http://www.injunea.demon.co.uk/pages/page210.htm
Please shed some light.
Thanks
Kumar