WARNING - beginner
I have a file structure as follows:-
there is a text file in ./dat called customer_code.dat and another in tmp called customer_code_load.ctl
these directories lead from a directory called work where there is the following shell script:-
the following errors are received:-
if [ $# != 1 ]
echo "usage customer_code.sh <data filename>"
sqlload USERID=$USERNAME/$PASSWORD CONTROL=$SQL_IN/customer_code_load.ctl DATA=$1 ERRORS=0 SILENT=FEEDBACK DIRECT=TRUE
RESULT = $?
mv ./customer_code_load.log $SQL_IN
if [ $RESULT != 0 ]
echo "customer_details sqlload fails with $RESULT"
1) I haven't got the directions of the directories correct !
SQL*Loader-500: Unable to open file (/customer_code_load.ctl)
SVR4 Error: 2: No such file or directory
customer_code.sh: RESULT: not found
mv: Insufficient arguments (1)
Usage: mv [-f] [-i] f1 f2
mv [-f] [-i] f1 ... fn d1
mv [-f] [-i] d1 d2
customer_code.sh: test: argument expected
2) RESULT will be fixed when the first error is dealt with
3) the move command works from the command line !!
4) the test: error should also be sorted when the first one is fixed
the value in SQL_IN is the full path plus /work all other variables have valid values