#!/bin/bash # Path to the file file="$IAS_ORACLE_HOME/instances/EBS_web_OHS1/config/OHS/EBS_web_OAQCTSUP/mod_wl_ohs.conf" # Grep for "sup" in the file output=$(grep "sup" "$file") # Email subject and body subject="Grep Results for 'sup'" body="The following lines contain 'sup' in the file $file:\n\n$output" # Encode the output using uuencode encoded=$(echo "$body" | uuencode output.txt) # Send email with encoded output as attachment echo -e "Please find attached the output of the script." | mailx -s "$subject" [email protected] <<< "$encoded" # Remove encoded file rm output.txt
Sunday, July 30, 2023
Vertx
#!/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 output=$(sqlplus -S apps/[apps_password]@[database] << EOF set serveroutput on; exec VERRTEXOICTAXEXAMPLE; exit; EOF ) # Email subject and body subject="Output of VERRTEXOICTAXEXAMPLE" body="<html><body><p>Please find below the output of VERRTEXOICTAXEXAMPLE:</p><pre>$output</pre></body></html>" # Send email with output in the body echo "$body" | mailx -a "Content-Type: text/html" -s "$subject" [email protected] # Remove output log file rm vertex_validation_$curr_dt.logvalidation 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
r12preabdul.sh
#!/bin/bash
# r12preabdul.sh - Preclone script for Oracle E-Business Suite R12
# Set the environment variables (replace with your values)
APPS_TOP="/path/to/your/APPS_
FND_TOP="/path/to/your/FND_
MWA_TOP="/path/to/your/MWA_
MSC_TOP="/path/to/your/MSC_
ORA_CONFIG_HOME="/path/to/
# Create necessary directories
mkdir -p clone_17apr2012/DT/{appl,10.1.
# Copy files to clone_17apr2012/DT/appl directory
cd clone_17apr2012/DT/appl
cp $APPS_TOP/*.env .
cp $APPS_TOP/admin/adovars.env .
cp $APPS_TOP/admin/adpltfrm.txt .
cp $APPS_TOP/admin/topfile.txt .
cp $APPS_TOP/admin/*.env .
cp $FND_TOP/resource/wf* .
cp $FND_TOP/resource/WF* .
cp -pr $FND_TOP/secure/* .
cp $ORA_CONFIG_HOME/env.txt .
cp $APPS_TOP/admin/adconfig.txt .
cp -pr $MWA_TOP/secure/* .
mkdir oahtml fndtop msc
cp $FND_TOP/admin/template/
cp $ORA_CONFIG_HOME/Apache/
cp $MSC_TOP/bin/MSCSLD* ./msc
# Copy files to clone_17apr2012/DT/10.1.2 directory
cd ../10.1.2
cp -rp $APPS_TOP/ora/10.1.2/network/
cp -rp $APPS_TOP/ora/10.1.2/network/
cp -rp $APPS_TOP/ora/10.1.2/forms/
cp -rp $APPS_TOP/ora/10.1.2/forms/
cp -rp $APPS_TOP/ora/10.1.2/forms/
# Copy files to clone_17apr2012/DT/10.1.3 directory
cd ../10.1.3
cp -rp $APPS_TOP/ora/10.1.3/network/
cp -rp $ORA_CONFIG_HOME/Apache/
cp -rp $ORA_CONFIG_HOME/Apache/
cp -rp $APPS_TOP/ora/10.1.3/opmn/
cp -rp $APPS_TOP/ora/10.1.3/config/* .
cp -rp $APPS_TOP/ora/10.1.3/*.env .
cp -rp $APPS_TOP/ora/10.1.3/deconfig/
cp -rp $APPS_TOP/ora/10.1.3/j2ee/* .
cp -rp $APPS_TOP/ora/10.1.3/
# Copy files to clone_17apr2012/DT/inst directory
cd ../inst
cp -rp /clone/erpapp/inst/* .
# Navigate back to the appl directory
cd ../appl
# FNDLOAD commands (update placeholders accordingly)
FNDLOAD apps/&&apps_pwd 0 Y DOWNLOAD $FND_TOP/patch/115/import/
FNDLOAD apps/&&apps_pwd 0 Y DOWNLOAD $FND_TOP/patch/115/import/