ora_switch_logfile.sh

#!/bin/bash
# ----------------------------------
# Fonction d'affichage de la syntaxe
# ----------------------------------
syntaxe()
{
 echo "Usage : $0 database_name"
}
# --------------------------
# Verification de la syntaxe
# --------------------------
if [ $# -ne 1 ]
then
 echo "=================================================="
 echo "ERREUR : Nombre d'arguments incorrects !"
 syntaxe
 echo "=================================================="
 exit 1
fi
# --------------------------
# Verification des arguments
# --------------------------
w_instance=$1
v_res=`grep "${w_instance}:" /etc/oratab | wc -l`
v_res=`expr ${v_res}`
if [ ${v_res} -eq 0 ]
then
 echo "=================================================="
 echo "ERREUR : Base de donnees ${w_instance} inexistante !"
 syntaxe
 echo "=================================================="
 exit 1
fi
export ORACLE_SID=${w_instance}
echo $ORACLE_SID
# export NLS_DATE_FORMAT=YYYY.MM.DD.HH24.MI.SS
w_prog=`basename $0 .sh`
w_date=$(date '+%Y_%m_%d_%H_%M_%S')
w_log_dest=/exploit/logs
w_log_file=$w_log_dest/${w_date}_${w_prog}_${w_instance}.log;
sqlplus /nolog <<EOSQL >>$w_log_file 2>&1
WHENEVER SQLERROR EXIT SQL.SQLCODE
connect / as sysdba
ALTER SYSTEM ARCHIVE LOG CURRENT;
exit

ora_compilation.sh

#!/bin/bash
# --------------------------
# Verification de la syntaxe
# --------------------------
if [ $# -ne 1 ]
then
 echo "=================================================="
 echo "ERREUR : Nombre d'arguments incorrects !"
 syntaxe
 echo "=================================================="
 exit 1
fi
# --------------------------
# Verification des arguments
# --------------------------
w_instance=$1
v_res=`grep "${w_instance}" /etc/oratab | wc -l`
v_res=`expr ${v_res}`
if [ ${v_res} -eq 0 ]
then
 echo "=================================================="
 echo "ERREUR : Base de donnees [${w_instance}] inexistante !"
 syntaxe
 echo "=================================================="
 exit 1
fi
echo "SID=${w_instance}"
export ORACLE_SID=${w_instance}
ls /soft/oracle/db102/rdbms/admin/utlrp.sql
err_fic=$?
if [ "${err_fic}" != "0" ]
then
 echo Fichier absent.
 exit ${err_fic}
fi
export ORACLE_SID=$1
echo "recompile tous les objets invalides" ${ORACLE_SID}
sqlplus /nolog <<EOF
 connect / as sysdba
 WHENEVER SQLERROR EXIT SQL.SQLCODE
 SELECT owner#,name,status,ctime,mtime,stime FROM obj$ WHERE status IN (4, 5, 6);
start /soft/oracle/db102/rdbms/admin/utlrp.sql
SELECT job_name FROM dba_scheduler_running_jobs WHERE job_name like 'UTL_RECOMP_SLAVE_%';
exit
 EOF
exit ${err_sql}

stop_database.sh

#!/bin/bash
# ==================================================
# Nom : start_database.sh
# Objet : arret d'une base de donnees
# Cree le : 28/01/2010
# Syntaxe : start_database.sh database_name
# ==================================================
# ----------------------------------
# Fonction d'affichage de la syntaxe
# ----------------------------------
syntaxe()
{
 echo "Usage : $0 database_name"
}
# --------------------------
# Verification de la syntaxe
# --------------------------
if [ $# -ne 1 ]
then
 echo "=================================================="
 echo "ERREUR : Nombre d'arguments incorrects !"
 syntaxe
 echo "=================================================="
 exit 1
fi
# --------------------------
# Verification des arguments
# --------------------------
w_instance=$1
v_res=`grep "${w_instance}:" /etc/oratab | wc -l`
v_res=`expr ${v_res}`
if [ ${v_res} -eq 0 ]
then
 echo "=================================================="
 echo "ERREUR : Base de donnees ${w_instance} inexistante !"
 syntaxe
 echo "=================================================="
 exit 1
fi
export ORACLE_SID=${w_instance}
# export NLS_DATE_FORMAT=YYYY.MM.DD.HH24.MI.SS
w_prog=`basename $0 .sh`
w_date=$(date '+%Y_%m_%d_%H_%M_%S')
w_log_dest=/exploit/logs
w_log_file=$w_log_dest/${w_date}_${w_prog}_${w_instance}.log;
sqlplus /nolog <<EOSQL >>$w_log_file 2>&1
connect / as sysdba
shutdown immediate;
exit
EOSQL

start_database.sh

#!/bin/bash
# ==================================================
# Nom : start_database.sh
# Objet : demarrage d'une base de donnees
# Cree le : 28/01/2010
# Syntaxe : start_database.sh database_name
# ==================================================
# ----------------------------------
# Fonction d'affichage de la syntaxe
# ----------------------------------
syntaxe()
{
 echo "Usage : $0 database_name"
}
# --------------------------
# Verification de la syntaxe
# --------------------------
if [ $# -ne 1 ]
then
 echo "=================================================="
 echo "ERREUR : Nombre d'arguments incorrects !"
 syntaxe
 echo "=================================================="
 exit 1
fi
# --------------------------
# Verification des arguments
# --------------------------
w_instance=$1
v_res=`grep "${w_instance}:" /etc/oratab | wc -l`
v_res=`expr ${v_res}`
if [ ${v_res} -eq 0 ]
then
 echo "=================================================="
 echo "ERREUR : Base de donnees ${w_instance} inexistante !"
 syntaxe
 echo "=================================================="
 exit 1
fi
export ORACLE_SID=${w_instance}
echo $ORACLE_SID
# export NLS_DATE_FORMAT=YYYY.MM.DD.HH24.MI.SS
w_prog=`basename $0 .sh`
w_date=$(date '+%Y_%m_%d_%H_%M_%S')
w_log_dest=/exploit/logs
w_log_file=$w_log_dest/${w_date}_${w_prog}_${w_instance}.log;
sqlplus /nolog <<EOSQL >>$w_log_file 2>&1
connect / as sysdba
startup;
select NAME, CREATED,LOG_MODE,OPEN_MODE from v\$database;
exit
EOSQL

 

ora_arch_logfile.sh

#!/bin/bash
# ----------------------------------
# Fonction d'affichage de la syntaxe
# ----------------------------------
syntaxe()
{
 echo "Usage : $0 database_name"
}
# --------------------------
# Verification de la syntaxe
# --------------------------
if [ $# -ne 1 ]
then
 echo "=================================================="
 echo "ERREUR : Nombre d'arguments incorrects !"
 syntaxe
 echo "=================================================="
 exit 1
fi
# --------------------------
# Verification des arguments
# --------------------------
w_instance=$1
v_res=`grep "${w_instance}:" /etc/oratab | wc -l`
v_res=`expr ${v_res}`
if [ ${v_res} -eq 0 ]
then
 echo "=================================================="
 echo "ERREUR : Base de donnees ${w_instance} inexistante !"
 syntaxe
 echo "=================================================="
 exit 1
fi
export ORACLE_SID=${w_instance}
echo $ORACLE_SID
# export NLS_DATE_FORMAT=YYYY.MM.DD.HH24.MI.SS
w_prog=`basename $0 .sh`
w_date=$(date '+%Y_%m_%d_%H_%M_%S')
w_log_dest=/exploit/logs
w_log_file=$w_log_dest/${w_date}_${w_prog}_${w_instance}.log;
sqlplus /nolog <<EOSQL >>$w_log_file 2>&1
WHENEVER SQLERROR EXIT SQL.SQLCODE
connect / as sysdba
ALTER SYSTEM ARCHIVE LOG CURRENT;
exit

sauve_cold.sh

#!/bin/bash
# ==================================================
# Nom : sauve_cold.sh
# Objet : sauvegarde RMAN a froid d'une base complete
# Auteur : S. GOURGAND - DIGORA
# Cree le : 27/01/2010
# Syntaxe : sauve_cold.sh database_name
# ==================================================
# ----------------------------------
# Fonction d'affichage de la syntaxe
# ----------------------------------
syntaxe()
{
 echo "Usage : $0 database_name"
}
# --------------------------
# Verification de la syntaxe
# --------------------------
if [ $# -ne 1 ]
then
 echo "=================================================="
 echo "ERREUR : Nombre d'arguments incorrects !"
 syntaxe
 echo "=================================================="
 exit 1
fi
# --------------------------
# Verification des arguments
# --------------------------
w_instance=$1
echo "w_instance : "$1
[ "${HOSTNAME}" = "king" -o "${HOSTNAME}" = "king.faiveley.com" ] && w_num=1
[ "${HOSTNAME}" = "kong" -o "${HOSTNAME}" = "kong.faiveley.com" ] && w_num=2
[ "${HOSTNAME}" = "ping" -o "${HOSTNAME}" = "ping.faiveleytransport.local" ] && w_num=3
[ "${HOSTNAME}" = "pong" -o "${HOSTNAME}" = "pong.faiveleytransport.local" ] && w_num=4
v_res=`grep "${w_instance}${w_num}:" /etc/oratab | wc -l`
v_res=`expr ${v_res}`
if [ ${v_res} -eq 0 ]
then
 echo "=================================================="
 echo "ERREUR : Base de donnees ${w_instance} inexistante !"
 syntaxe
 echo "=================================================="
 exit 1
fi
export ORACLE_SID=${w_instance}${w_num}
# export NLS_DATE_FORMAT=YYYY.MM.DD.HH24.MI.SS
export NLS_DATE_FORMAT="DD/MM/YYYY HH24:MI:SS"
w_prog=`basename $0 .sh`
w_date=$(date '+%Y_%m_%d_%H_%M_%S')
w_log_dest=/exploit/logs
w_log_file=$w_log_dest/${w_date}_${w_prog}_${w_instance}.log;
rman <<EORMAN >${w_log_file} 2>&1
connect target / ;
connect catalog rman/rman@ref_rman;
crosscheck backup;
crosscheck archivelog all;
delete noprompt expired backup;
delete noprompt expired archivelog all;
delete noprompt obsolete;
startup force dba;
shutdown immediate;
startup mount;
backup tag 'database cold' database plus archivelog tag 'archives cold';
alter database open;
delete noprompt obsolete;
report need backup;
list backup summary;
exit
EORMAN
# Ajout 08/04/2010 : Envoi du fichier de traces par mail
# ------------------------------------------------------
w_host=`basename $HOSTNAME .faiveley.com`
w_host=`basename ${w_host} .faiveleytransport.local | tr [a-z] [A-Z]`
mail -s "${w_host} : Sauvegarde a froid de la base ${w_instance}" u1_info_exploit@faiveleytransport.com <${w_log_file}
# Ajout 31/03/2011 : Traitement des anomalies pour VTOM
# -----------------------------------------------------
v_res=`grep "^RMAN-" ${w_log_file} | wc -l`
v_res=`expr ${v_res}`
if [ ${v_res} -gt 0 ]
then
 echo +----------------------------+
 echo ! DEBUT DU FICHIER DE TRACES !
 echo +----------------------------+
 cat ${w_log_file}
 echo +--------------------------+
 echo ! FIN DU FICHIER DE TRACES !
 echo +--------------------------+
 exit 1
else
 exit 0
fi

sauve_hot.sh

#!/bin/bash
# ==================================================
# Nom : sauve_backup.sh
# Objet : sauvegarde RMAN d'une base complete
# Auteur : S. GOURGAND - DIGORA
# Cree le : 28/01/2010
# Syntaxe : sauve_backup.sh database_name
# ==================================================
# ----------------------------------
# Fonction d'affichage de la syntaxe
# ----------------------------------
syntaxe()
{
 echo "Usage : $0 database_name"
}
# --------------------------
# Verification de la syntaxe
# --------------------------
if [ $# -ne 1 ]
then
 echo "=================================================="
 echo "ERREUR : Nombre d'arguments incorrects !"
 syntaxe
 echo "=================================================="
 exit 1
fi
# --------------------------
# Verification des arguments
# --------------------------
w_instance=$1
[ "${HOSTNAME}" = "king" -o "${HOSTNAME}" = "king.faiveley.com" ] && w_num=1
[ "${HOSTNAME}" = "kong" -o "${HOSTNAME}" = "kong.faiveley.com" ] && w_num=2
[ "${HOSTNAME}" = "ping" -o "${HOSTNAME}" = "ping.faiveleytransport.local" ] && w_num=3
[ "${HOSTNAME}" = "pong" -o "${HOSTNAME}" = "pong.faiveleytransport.local" ] && w_num=4
v_res=`grep "${w_instance}${w_num}:" /etc/oratab | wc -l`
v_res=`expr ${v_res}`
if [ ${v_res} -eq 0 ]
then
 echo "=================================================="
 echo "ERREUR : Base de donnees [${w_instance}] inexistante !"
 syntaxe
 echo "=================================================="
 exit 1
fi
export ORACLE_SID=${w_instance}${w_num}
echo instance : ${ORACLE_SID}
# export NLS_DATE_FORMAT=YYYY.MM.DD.HH24.MI.SS
export NLS_DATE_FORMAT="DD/MM/YYYY HH24:MI:SS"
w_prog=`basename $0 .sh`
w_date=$(date '+%Y_%m_%d_%H_%M_%S')
w_log_dest=/exploit/logs
w_log_file=$w_log_dest/${w_date}_${w_prog}_${w_instance}.log;
rman <<EORMAN >${w_log_file} 2>&1
connect target / ;
crosscheck backup;
crosscheck archivelog all;
delete noprompt expired backup;
delete noprompt expired archivelog all;
delete noprompt obsolete;
backup incremental level 0 tag 'database level 0' database plus archivelog tag 'archives level 0';
delete noprompt obsolete;
report need backup;
list backup summary;
exit
EORMAN
# Ajout 08/04/2010 : Envoi du fichier de traces par mail
# ------------------------------------------------------
w_host=`basename $HOSTNAME .faiveley.com`
w_host=`basename ${w_host} .faiveleytransport.local | tr [a-z] [A-Z]`
mail -s "${w_host} : Hot Backup Database ${w_instance}" nicolas.lamotte@faiveleytransport.com <${w_log_file}
# Ajout 31/03/2011 : Traitement des anomalies pour VTOM
# -----------------------------------------------------
v_res=`grep "^RMAN-" ${w_log_file} | wc -l`
v_res=`expr ${v_res}`
if [ ${v_res} -gt 0 ]
then
 echo +----------------------------+
 echo ! DEBUT DU FICHIER DE TRACES !
 echo +----------------------------+
 cat ${w_log_file}
 echo +--------------------------+
 echo ! FIN DU FICHIER DE TRACES !
 echo +--------------------------+
 exit 1
else
 exit 0
fi

ora_alertlog.sh

#!/bin/sh
echo "----------------------------------------------"
echo " Recherche des erreurs dans les log"
echo "----------------------------------------------"
echo " "
fic=$1 # nom du fichier
month=$2 # mois recherché
year=$3 # année recherchée
day=$4 # jour recherché
error="$5" # chaine erreur
#fic=/soft/oracle/admin/BIPROD/bdump/alert_BIPROD.log
#month=DEC
#year=2013
#day=30
#error="ORA-"
# On transforme le mois de MAJUSCULE en minuscule puis on passe la première lettre en Majuscule
month=`echo $month|tr "A-Z" "a-z"|sed 's/^./\u&/'`
day=`echo $day | tr "0" " " | sed 's/^./\u&/'`
echo "File : $fic"
echo "month : $month"
echo "year : $year"
echo "day : $day"
echo "error : $error"
nbligne=`wc $fic | awk '{print $1}'`
echo "nom de lignes dans le fichier log : " $nbligne
echo "grep -n '... $month $day ........ $year' $fic |head -1 | awk -F ':' '{print $1}'"
numligne=`grep -n "... $month $day ........ $year" $fic |head -1 | awk -F ':' '{print $1}'`
echo "Numero de la ligne de la date demandée : " $numligne
# on compte le nombre d'erreurs trouvées et on affiche les 5 lignes suivantes du log
echo "tail -n +$numligne $fic| grep $error |wc -l"
cpt=`tail -n +$numligne $fic| grep -v WARNING |grep $error |wc -l`
if [ $cpt == 0 ]; then
 # si pas d'erreur on sort
 exit 0
else
 # On affiche les erreur pour le log Vtom
 echo "tail -n +$numligne $fic | grep -C 5 $error"
 tail -n +$numligne $fic |grep -v WARNING| grep -C 5 $error
 exit $cpt
fi

stop_server.sh

#!/bin/bash
hostname
uptime
echo ===== arret Oracle =====
echo ----- ps oracle ------
ps -ef | grep listener | grep -v grep
ps -ef | grep smon | grep -v grep
echo ----- uptime
uptime
echo ----- stop database
su -l ora102 -l /exploit/scripts/stop_oracle.sh
echo ===== arret Mysql======
echo ----- ps mysqld ------
ps -ef | grep mysqld | grep -v grep
echo ----- uptime
uptime
echo ----- stop database
/exploit/scripts/my_stop_database.sh
echo ----- tempo 600
sleep 600
echo ----- check process oracle
ps -ef | grep listener | grep -v grep
ps -ef | grep smon | grep -v grep
echo ----- check process mysql
ps -ef | grep mysqld | grep -v grep
echo ----- halt
halt

	

start_server.sh

#!/bin/bash
hostname
echo ===== start Oracle =====
echo ----- start database
su -l ora102 -l /exploit/scripts/start_oracle.sh
echo ----- ps oracle ------
ps -ef | grep lsnr | grep -v grep
ps -ef | grep smon | grep -v grep
echo ===== start Mysql======
echo ----- ps mysqld ------
ps -ef | grep mysqld | grep -v grep
echo ----- uptime
uptime
echo ----- start database
/exploit/scripts/my_start_database.sh
echo ----- check process mysql
ps -ef | grep mysqld | grep -v grep

stop_listener.sh

#!/bin/bash
# ==================================================
# Nom : stop_listener.sh
# Objet : arret du listener
# Cree le : 28/01/2010
# Syntaxe : stop_listener.sh
# ==================================================
# ----------------------------------
# Fonction d'affichage de la syntaxe
# ----------------------------------
syntaxe()
{
 echo "Usage : $0"
}
lsnrctl status
lsnrctl stop

start_listener.sh

#!/bin/bash
# ==================================================
# Nom : start_listener.sh
# Objet : demarrage du listener
# Cree le : 28/01/2010
# Syntaxe : start_listener.sh
# ==================================================
# ----------------------------------
# Fonction d'affichage de la syntaxe
# ----------------------------------
syntaxe()
{
 echo "Usage : $0"
}
lsnrctl start
lsnrctl status

stop_oracle.sh

#!/bin/bash
# ==================================================
# Nom : stop_oracle.sh
# Objet : arret des listeners et bases de donnees
# Cree le : 28/01/2010
# Syntaxe : stop_oracle.sh
# ==================================================
# ----------------------------------
# Fonction d'affichage de la syntaxe
# ----------------------------------
syntaxe()
{
 echo "Usage : $0"
}
/exploit/scripts/stop_listener.sh
/exploit/scripts/stop_database.sh KTP
# /exploit/scripts/stop_database.sh STRPRD
/exploit/scripts/stop_database.sh KTPTST
/exploit/scripts/stop_database.sh HYPDEV
/exploit/scripts/stop_database.sh HYPPROD
/exploit/scripts/stop_database.sh EPS
/exploit/scripts/stop_database.sh BIPROD
/exploit/scripts/stop_database.sh ABEL
/exploit/scripts/stop_database.sh BITEST
/exploit/scripts/stop_database.sh SISDEV

start_oracle.sh

#!/bin/bash
# ==================================================
# Nom : start_oracle.sh
# Objet : demarrage des listeners et bases de donnees
# Cree le : 28/01/2010
# Syntaxe : start_oracle.sh
# ==================================================
# ----------------------------------
# Fonction d'affichage de la syntaxe
# ----------------------------------
syntaxe()
{
 echo "Usage : $0"
}
sh /exploit/scripts/start_listener.sh
sh /exploit/scripts/start_database.sh KTP
# sh /exploit/scripts/start_database.sh STRPRD
sh /exploit/scripts/start_database.sh KTPTST
sh /exploit/scripts/start_database.sh HYPDEV
sh /exploit/scripts/start_database.sh HYPPROD
sh /exploit/scripts/start_database.sh EPS
sh /exploit/scripts/start_database.sh BIPROD
sh /exploit/scripts/start_database.sh ABEL
sh /exploit/scripts/start_database.sh BITEST
sh /exploit/scripts/start_database.sh SISDEV

vtom_ulimit.sh

ulimit -u

modifier le fichier /etc/security/limits.conf

teamedu soft nofile 65536
teamedu hard nofile 1048576
vtom soft nofile 65536
vtom hard nofile 1048576

Relancer l’agent Vtom.


Check that /etc/ssh/sshd_config contains:
UsePAM=yes


vtom@vlpdm57x:~> ulimit -a
core file size (blocks, -c) 1
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 983995
max locked memory (kbytes, -l) 64
max memory size (kbytes, -m) 107068208
open files (-n) 65536
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes (-u) 16384
virtual memory (kbytes, -v) 121744080
file locks (-x) unlimited

vtom@vlpdm57x:~> cat /etc/sysctl.conf
# Disable response to broadcasts.
# You don’t want yourself becoming a Smurf amplifier.
net.ipv4.icmp_echo_ignore_broadcasts = 1
# enable route verification on all interfaces
net.ipv4.conf.all.rp_filter = 1
# enable ipV6 forwarding
#net.ipv6.conf.all.forwarding = 1
# increase the number of possible inotify(7) watches
fs.inotify.max_user_watches = 65536
# avoid deleting secondary IPs on deleting the primary IP
net.ipv4.conf.default.promote_secondaries = 1
net.ipv4.conf.all.promote_secondaries = 1
kernel.shmall = 2097152
kernel.shmmax = 536870912
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 262144
net.core.wmem_default = 262144
net.core.rmem_max = 262144
net.core.wmem_max = 262144

stop_server.sh

#!/bin/bash
hostname
uptime
echo ===== arret Mysql======
echo ----- ps mysqld ------
ps -ef | grep mysqld | grep -v grep
echo ----- uptime
uptime
echo ----- stop database
/exploit/scripts/my_stop_database.sh
echo ----- tempo 600
sleep 600
echo ----- check process
ps -ef | grep mysqld | grep -v grep
echo ----- halt
halt

purge_file.sh

#!/bin/bash
# ==================================================
# Nom : purge_file.sh
# Objet : purge de fichier
# Auteur : FAIVELEY - DIGORA
# Cree le : 01/01/2010
# Modifié par : EF le 23/02/2012
# Syntaxe : purge_file.sh repertoire_cible nb_de_jours
# ==================================================
# ----------------------------------
# Fonction d'affichage de la syntaxe
# ----------------------------------
syntaxe()
{
 echo "Usage : $0 repertoire_cible nb_de_jours"
}
# --------------------------
# Verification de la syntaxe
# --------------------------
if [ $# -ne 3 ]
then
 echo "=================================================="
 echo "ERREUR : Nombre d'arguments incorrects !"
 syntaxe
 echo "=================================================="
 exit 1
fi
# ----------
# Traitement
# ----------
w_rep_purge=$1
w_jour_purge=$2
w_extension=$3
echo w_rep_purge = $1
echo w_jour_purge = $2
echo w_extension = $3
w_prog=`basename $0 .sh`
w_date=$(date '+%Y_%m_%d_%H_%M_%S')
w_log_dest=/exploit/logs
w_log_file=${w_log_dest}/${w_date}_${w_prog}.log
echo " "
echo fichier log : $w_log_file
w_rep_purge=`dirname ${1}/toto`
{
echo `date +"%Y-%m-%d %H:%M:%S"` "- Debut purge du repertoire [${w_rep_purge}] pour les fichiers modifies il y a [${w_jour_purge}] jours ..."
# Recherche et supression des fichiers dans le rep w_rep_purge et qui ont ete modifies il y a $w_jour_purge jours
#
# ------ Modifié + par : EF le 23/02/2012
# ------ on traite tous les extensions de fichier.
#
#if [ "${w_rep_purge}" = "${w_log_dest}" ]
#then
# for v_fic in `find ${w_rep_purge}/ -type f -mtime ${w_jour_purge} -name "*.e"`
# do
# echo " - Suppression du fichier [${v_fic}] ..."
# rm -f ${v_fic}
# done
# for v_fic in `find ${w_rep_purge}/ -type f -mtime ${w_jour_purge} -name "*.o"`
# do
# echo " - Suppression du fichier [${v_fic}] ..."
# rm -f ${v_fic}
# done
# for v_fic in `find ${w_rep_purge}/ -type f -mtime ${w_jour_purge} -name "*.${w_extension}"`
# do
# echo " - Suppression du fichier [${v_fic}] ..."
# rm -f ${v_fic}
# done
#else
# for v_fic in `find ${w_rep_purge}/ -type f -mtime ${w_jour_purge} -name "*.${w_extension}"`
 for v_fic in `find ${w_rep_purge}/ -type f -mtime ${w_jour_purge} -name "*.*"`
 do
 echo " - Suppression du fichier [${v_fic}] ..."
 rm -f ${v_fic}
 done
#fi
# Modifié - par : EF le 23/02/2012
echo `date +"%Y-%m-%d %H:%M:%S"` "- Fin purge du repertoire [${w_rep_purge}] !"
} >${w_log_file} 2>&1
# Pause de 10 secondes : NE PAS SUPPRIMER
sleep 10
cat $w_log_file