From 53879fd9ba8429a16ec97146ca93f1529723dba3 Mon Sep 17 00:00:00 2001 From: Yacine31 Date: Sun, 12 Nov 2023 04:35:35 +0100 Subject: [PATCH] Update rapport_mensuel.sh --- rapport_mensuel.sh | 25 +++++++------------------ 1 file changed, 7 insertions(+), 18 deletions(-) diff --git a/rapport_mensuel.sh b/rapport_mensuel.sh index b540e58..79c2ee3 100644 --- a/rapport_mensuel.sh +++ b/rapport_mensuel.sh @@ -7,33 +7,22 @@ do export ORACLE_SID=$r export HTML_FILE=Rapport_$HNAME_${ORACLE_SID}_${DATETIME}.html . oraenv -s > /dev/null -# echo " -# -# -# -# -# -# Rapport Oracle Database : ${ORACLE_SID} -# -# -# -#
-# -# " > ${HTML_FILE} cat sql/00_html_header.html >> ${HTML_FILE} + echo "

Date : $DATETIME, Hostname : $HNAME, base de données : ${ORACLE_SID}

" >> ${HTML_FILE} + # execution des scripts shell + for f in sh/*.sh + do + /bin/sh $f >> ${HTML_FILE} + done + # execution des scripts sql for f in sql/*.sql do sed '1 s/^/SET PAGES 999 FEEDBACK OFF MARKUP HTML ON SPOOL ON PREFORMAT OFF ENTMAP OFF\n/' $f | sqlplus -s / as sysdba >> ${HTML_FILE} done - # execution des scripts shell - for f in sh/*.sh - do - /bin/sh $f >> ${HTML_FILE} - done sed -i 's/$//g' ${HTML_FILE}