Sunday, July 30, 2023

validation script

#!/bin/bash # Get the current date and time curr_dt=$(date +"%Y-%m-%d-%H-%M-%S") # Connect to the apps schema and run the command sqlplus apps/[apps_password]@[database] << EOF > vertex_validation_$curr_dt.log set serveroutput on; exec VERRTEXOICTAXEXAMPLE; exit; EOF # Encode the log file using uuencode uuencode vertex_validation_$curr_dt.log vertex_validation_$curr_dt.log > vertex_validation_$curr_dt.txt # Email subject and body subject="Output of VERRTEXOICTAXEXAMPLE" body="Please find attached the output of VERRTEXOICTAXEXAMPLE." # Send email with output log file mailx -s "$subject" [email protected] < vertex_validation_$curr_dt.txt # Remove output log and encoded files rm vertex_validation_$curr_dt.log rm vertex_validation_$curr_dt.txt

No comments:

Post a Comment