Problème avec l'utilisation de la commande system awk
Bonjour ,
je voudrais utiliser la commande system dans le language awk
voici mon script
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
|
Requete=$(su - orafrm -c "sqlplus -s apps/apps <<!
set head off
select FCPT.USER_CONCURRENT_PROGRAM_NAME
, FCR.ACTUAL_START_DATE
, FCR.ACTUAL_COMPLETION_DATE
from FND_CONCURRENT_REQUESTS FCR
, FND_CONCURRENT_PROGRAMS FCP
, FND_CONCURRENT_PROGRAMS_TL FCPT
where FCP.CONCURRENT_PROGRAM_ID = FCR.CONCURRENT_PROGRAM_ID
and FCP.CONCURRENT_PROGRAM_ID = FCPT.CONCURRENT_PROGRAM_ID
and FCP.CONCURRENT_PROGRAM_NAME = 'CMCTCM'
and FCPT.LANGUAGE = 'F'
and FCR.STATUS_CODE = 'I'
and MONTHS_BETWEEN(SYSDATE , FCR.ACTUAL_COMPLETION_DATE) = 0;
exit
!")
echo $Requete | awk '{
{
if ($4 = $5)
Mon soucis =>
system ("echo \"ceci est un test\" | mail -s \"Alerte (test): pas de problème au niveau d'un Current manager\" \"email@nomdomaine\"")
else
system ("echo \"ceci est un test\" | mail -s \"Alerte (test): problème au niveau d'un Current manager\" \"email@nomdomaine\"")
}
}' |
mon problème est la commande de base que je veux utiliser comprends des guillemets or la commande system en utilise egalement , du coup il y a confusion ...
j'ai essayé de rajouter les barres \ comme dans le script mais rien à faire ...
la commande que je veux faire passer à la commande system("") est celle-ci :
echo "ceci est un test" | mail -s "Alerte (test): problème au niveau d'un Current manager" "email@nom_domaine"
Merci