Correction d'une script shell
ahmed_king29
Messages postés
28
Date d'inscription
Statut
Membre
Dernière intervention
-
dubcek Messages postés 18789 Date d'inscription Statut Contributeur Dernière intervention -
dubcek Messages postés 18789 Date d'inscription Statut Contributeur Dernière intervention -
Bonjour,
Merci de m'aider :
Le principe est de chercher dans le contenu d'un fichier sous la forme " oraBackup'date '+%Y%m%d_0300''.log " de chercher la chaine de caractère "This backup (20120406_0800) session is completed and finished" s'il est existe affiche 1 sinon 0.
J'ai commencer par ce script :
DIR=/opt/oracle/admin/VSDB_S1/backuplogs
FILE=oraBackup'date '+%Y%m%d_0300''.log
if [ -e cat $DIR/$FILE | grep -w " This backup (20120406_0800) session is completed and finished" ]
then echo 1
else
echo 0
fi
Merci de corriger ce script.
Le contenu du fichier oraBackup'date '+%Y%m%d_0300''.log :
Investigating block corruption...
No block corruption reported...
Finalizing this backup session, going to sleep for 60 sec...
Unmounting backup disks...
Removing lockfile...
Setting correct directory permissions as a result of a potential Data Guard re-installation...
This backup (20120607_0300) session is completed and finished with 2 warning(s).
/etc/init.d/orawatch start... on vs1a
/etc/init.d/orawatch start... on vs1b
Merci de m'aider :
Le principe est de chercher dans le contenu d'un fichier sous la forme " oraBackup'date '+%Y%m%d_0300''.log " de chercher la chaine de caractère "This backup (20120406_0800) session is completed and finished" s'il est existe affiche 1 sinon 0.
J'ai commencer par ce script :
DIR=/opt/oracle/admin/VSDB_S1/backuplogs
FILE=oraBackup'date '+%Y%m%d_0300''.log
if [ -e cat $DIR/$FILE | grep -w " This backup (20120406_0800) session is completed and finished" ]
then echo 1
else
echo 0
fi
Merci de corriger ce script.
Le contenu du fichier oraBackup'date '+%Y%m%d_0300''.log :
Investigating block corruption...
No block corruption reported...
Finalizing this backup session, going to sleep for 60 sec...
Unmounting backup disks...
Removing lockfile...
Setting correct directory permissions as a result of a potential Data Guard re-installation...
This backup (20120607_0300) session is completed and finished with 2 warning(s).
/etc/init.d/orawatch start... on vs1a
/etc/init.d/orawatch start... on vs1b
A voir également:
- Script shell linux exercice corrigé
- Classic shell - Télécharger - Personnalisation
- Script vidéo youtube - Guide
- Linux reader - Télécharger - Stockage
- Mas script - Accueil - Windows
- Ghost script - Télécharger - Polices de caractères
3 réponses
hello
This backup (20120607_0300) session is completed and finished
comment connaitre 20120607_0300 c'est la date du jour ? et 300 ou 800 ?
This backup (20120607_0300) session is completed and finished
comment connaitre 20120607_0300 c'est la date du jour ? et 300 ou 800 ?