Please delete de thread. Thanks.
Is 'unexpected end of file' all it prints?
---------- Post updated at 02:38 PM ---------- Previous update was at 02:37 PM ----------
The error could also be in profile.sinti9d
shouldn't work=/work/input/telefonia
be defined as WORK=/work/input/telefonia
?
check all of your if/then/else/fi combos to make sure they're balanced. Also check the here-docs, etc...
Please delete de thread. Thanks.
sqlplus -s rnp/rnp@sinti9d <<EOF
set serveroutput on
spool salida.txt
begin
sp_apareo_npo_tmp2('/work/input/telefonia');
end;
/
spool off
EOF
this construction is called a 'here-doc'.
Now that I used the code-tags (instead of quotes).... Is your closing EOF indented like above OR does it start from the beginning of a line?
If indented, remove extra spaces and move it to the beginning of the line.
what's this? A script? If so, check it as well!
### CARGA ARCHIVO EN LA TABLA ###
carga_numeros_portados.scr
Maybe something else is complaining. Maybe it's one of the other commands, not the script itself. The syntax looks okay.
Start checking return values, add 'set -x' to the top of your script so it prints progress as it goes, and so on. That should help narrow things down.
--- deleted---
<< [-]word
The shell input is read up to a line that is the same
as word, or to an EOF. No parameter substitution, com-
mand substitution, or file name generation is per-
formed on word. The resulting document, called a
here-document, becomes the standard input. If any
character of word is quoted, no interpretation is
placed upon the characters of the document. Otherwise,
parameter and command substitution occur, \NEWLINE is
ignored, and \ must be used to quote the characters \,
$, `, and the first character of word. If - is
appended to <<, then all leading tabs are stripped
from word and from the document.
I remove the extra spaces and it work! Thank you!
I copy the script in "notepad ++" and it colour all code and i can find de error!.
Thank very much for the help! I send a hug!
Never edit scripts inside Windows. That will fill your file with garbage carriage returns.
Many UNIX text editors have syntax highlighting -- and are more likely to have relevant settings for your scripting language than some random Windows editor.
Ok thank you very much, I will consider your advice.