I would like to save this message in a variable to use later in the script.
The following awk expression will pull the first of the two sentences out for you to save in a variable:
analyze_status=`cat /u01/oracle/cfgtoollogs/upgrade/auto/autoupgrade.log | grep 'ANALYZE and FIXUPS' | awk 'NR==1'`Output of the command is:
echo $analyze_status ANALYZE and FIXUPS modes are not run when converting a Non-CDB database to a PDBWithout the NR==1 I get the same sentence repeated twice:
ANALYZE and FIXUPS modes are not run when converting a Non-CDB database to a PDB ANALYZE and FIXUPS modes are not run when converting a Non-CDB database to a PDB
No comments:
Post a Comment