oracle - Bash - Error ORA-01017: invalid username/password; logon denied with array -


i have shell array in wich there list of tables of oracle db. array:

listtabs="" listtabs=$listtabs"t_tab1\n" listtabs=$listtabs"t_tab2\n" listtabs=$listtabs"t_tab3"    echo $listtabs arrarr=0 ifs=\n listarr in ${listtabs[@]};        #echo $listarr      mydir[${arr}]=$listarr      (( arridx = $arr+ 1 )) done 

then have select sqlplus connection

sqlplus -s -l ${myconnctiondb} @${file_sql} 

when try run shell error:ora-01017: invalid username/password; logon denied. i'm sure connection correct because if delete array shell goes well. ideas?

for array you're setting ifs:

ifs=\n 

... affect string interpretation later in script well. can either unset ifs after array section, or store old value in temporary variable before setting (o_ifs=$ifs; ifs=\n) , revert afterwards (ifs=$o_ifs; unset o_ifs).


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -