Skip to Main Content

Infrastructure Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

check if string exists in file

RobeenMar 4 2018 — edited Mar 4 2018

Red Hat Linux 6

Hi,

Is there a way I can check if a string exists in a file, then it will execute an import dump job?

if [ -e grep 'IMPORTGAIAGCICIFLAG=TRUE' /tmp/file.txt  ]

        then

                date=(date + "%d%m%Y%H%M")

                arch=$(ls -t | head -1)

                mv /oldbackup/OTC/gcidev/movedump/*.log /oldbackup/OTC/gcidev/exportlog

                imp \"/ as sysdba\" file=$arch fromuser=L2TCP touser=dnrtool log=impDEVgci`(date +"%d%m%Y%H%M")`.log

Regards,

Joe

This post has been answered by Dude! on Mar 4 2018
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 1 2018
Added on Mar 4 2018
14 comments
478 views