Prevent printing exception in my perl script. in Exception original DB password is being printed so i'm trying to suppress it.
I have already tried system("$sql1 &2>dev/null")
but it is not help full
sub somefunc{
my sql1 = sqlplus -S $user_name/$password\@$TNSname $sqlfilename $somestring;
system(sql1);
}
Exception :
some time $somestring is coming with character like '>' and '(' so >im getting
sh: -c: line 0: syntax error near unexpected token `>'
sh: -c: line 0: `sqlplus USERNAME/RAWPASSWORD@TNSNAME >@log.sql somescript.sh >>> Start time:
Sun #Jul 21 20:33:09 CDT 2019'
In above error the RAWPASSWORD is being printed in logs so i am
trying to avoid it