If I pipe this script:
me:~/git/my-project$ find . -type f -not -path '*bin*' -name '*ignored*sql' -exec cat {} \;
dsadadasda SELECT * FROM some_table;
into sqlplus
like this:
me:~/git/my-project$ find . -type f -not -path '*bin*' -name '*ignored*sql' -exec cat {} \; | sqlplus $my_connection_string | grep -i unknown
SQL> SP2-0734: unknown command beginning "dsadadasda..." - rest of line ignored.
then the error goes into STDOUT
instead of STDERR
:
me:~/git/my-project$ find . -type f -not -path '*bin*' -name '*ignored*sql' -exec cat {} \; | sqlplus $my_connection_string 1>/dev/null
me:~/git/my-project$
Is there any way to configure sqlplus
to do otherwise?