This discussion is archived
1 Reply Latest reply: Aug 9, 2012 6:13 AM by Karthick_Arp RSS

Help in Shell Script

user5647282 Newbie
Currently Being Moderated
Hi , I need to find a strin inside a file

I googled this, to write afeter sqlplus -s etc

#while IFS=$(echo '\012\001') read LINE ;
# do
# case ${LINE} in ORA-*|SP2-*) ord.extractor_porven.sh
# echo " JUSTO Dentro del error ORACLE se ha producido"
# *) echo ${LINE} ;
# esac
# done

My target its to find first ocurrence with ORA and first ocurrence (his ORA number) in order to
create a message like this for example ,saving in a variable .
########Error processing in Oracle ## 'OraErr' || Var1 || 'OraNumber'||Var2#########

This line will be write in same default file.dat
Can someone kindly help me ?

Thanks in advance,
Best Regards

Antonio
Sunny spain , :)
  • 1. Re: Help in Shell Script
    Karthick_Arp Guru
    Currently Being Moderated
    user5647282 wrote:
    Hi , I need to find a strin inside a file

    I googled this, to write afeter sqlplus -s etc

    #while IFS=$(echo '\012\001') read LINE ;
    # do
    # case ${LINE} in ORA-*|SP2-*) ord.extractor_porven.sh
    # echo " JUSTO Dentro del error ORACLE se ha producido"
    # *) echo ${LINE} ;
    # esac
    # done

    My target its to find first ocurrence with ORA and first ocurrence (his ORA number) in order to
    create a message like this for example ,saving in a variable .
    ########Error processing in Oracle ## 'OraErr' || Var1 || 'OraNumber'||Var2#########

    This line will be write in same default file.dat
    Can someone kindly help me ?

    Thanks in advance,
    Best Regards

    Antonio
    Sunny spain , :)
    I am not quite sure of what you are asking. Is this related to Unix? In that case i would like to let you know this is a SQL and PL/SQL forum.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points