Bonjour,
j'ai le code suivant mais j'ai une erreur : "problème de fi"...
Je ne me souviens pas exactement de l'intitulé mais ça concernant le "fi" juste avant le "else"...
Je ne m'y connais pas trop mais je ne vois pas où pourrait se trouver l'erreur :/
Merci
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 #!/bin/ksh # script TEST.sh numsoc=1 numrun=2 # Is the file existing and not empty ? if [-f $fichier/$MSV01.$numsoc.$numrun.xml] then nbrmot= $(wc -l $fichier/MSV01.$numsoc.$numrun.xml) if [$nbrmot > 1] then cp $fichier/MSV01.$numsoc.$numrun.xml $tmp if [$? != 0] then echo "copying problem of the file" fi fi else echo "$fichier/$MSV01.$numsoc.$numrun.xml not present" fi![]()
Partager