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!

linux script

Roshan BisnathMar 25 2024

Oracle linux 8

Hi,

could you please advise why below is generating error?

if [ $(\grep "successfully" /backup/schema/backdb/backdb.dashboard.log) ]; then
 echo great.
else
 echo not good.
fi

content of dashboard.log

SQL*Plus: Release 19.0.0.0.0 - Production on
Version 19.18.0.0.0
Copyright (c) 1982, 2022, Oracle.  All rights reserved.
Last Successful login time:
Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.18.0.0.0
SQL>
PL/SQL procedure successfully completed.
SQL>
Commit complete.
SQL> Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.18.0.0.0

errro:

checklog.sh: line 1: [: too many arguments
not good.

Regards,

Roshan

This post has been answered by MichaelC-Oracle on Mar 25 2024
Jump to Answer
Comments
Post Details
Added on Mar 25 2024
1 comment
183 views