rewriting your script.
#!/bin/bash
# @echo;
# set nls_lang=russian_cis.ru8pc866
export NLS_LANG=russian_cis.ru8pc866
# not needed @echo off
# SET NLS_NUMERIC_CHARACTERS=. '
export NLS_NUMERIC_CHARACTERS='.'
PATH="/path/to/sqlDir/install:${PATH}"
# sqlldr.exe userid=PRB/0611@TSESTDB control=control_file.ctl LOG=fdb_log.log errors=100
sqlldr userid=PRB/0611@TSESTDB control=control_file.ctl LOG=fdb_log.log errors=100
# ? cmd
I've left your code in, but commented out (using the shell comment char '#'). The uncommented lines are the 'translation' of .bat syntax into Linux/Unix bash/shell syntax.
There some things above that you may need to fix:
You'll have to include the correct value in the resetting of PATH,
note that the value there is strictly to illustrate the issue.
export
is used so that variables set in the current shell (the
shell script) are visible to child processes that run from the shell
script, in this case the important one being sqlldr
I'm not sure what values you really need assigned to
NLS_NUMERIC_CHARACTERS
. Note that by quoting with the single-quote
char '
available to the shell, you should get exactly the value
used that you intended. If '*' or other reg-exp chars are used, this
may cause problems.
You may find that sqlldr.exe
has a different name altogether. The
linux/unix convention for executable commands does not require the
.exe
extension, so I have used sqlldr
. Just use the full name of
the program you find in the installed directory.
The line with #!/bin/bash
needs to be the first line in the file, with no leading spaces.
You'll also need to inform your OS that the script is intended to be executable. From a bash cmd line, IN the directory that contains this script, do
chmod 755 mySQLLDR_runningScript
Finally, not sure why you have cmd
at the end of your .bat file, to open a new window? You'll need to experiment on your system to find the correct cmd to do that. Maybe xterm
.
I hope this helps.