2018年02月15日 TEST 2018年02月15日 16:00:01 incr backup started back to 2018年02月14日 15:03:12 (backup #3) for share ebtek$ 2018年02月15日 16:13:37 Output from DumpPostUserCmd: /var/lib/backuppc/logmail.sh: 4: /var/lib/backuppc/logmail.sh: 2018年02月15日: not found 2018年02月15日 16:13:37 Output from DumpPostUserCmd: repertoire de backup 2018年02月15日 16:13:37 Output from DumpPostUserCmd: /var/lib/backuppc/pc/192.168.20.6 2018年02月15日 16:13:37 Output from DumpPostUserCmd: Journal 2018年02月15日 16:13:37 Output from DumpPostUserCmd: 2018年02月15日 16:13:38 incr backup 4 complete, 0 files, 0 bytes, 18 xferErrs (0 bad files, 0 bad shares, 18 other)
J'ai modifier ma commande comme suit et voici ce qu'il me renvoi
sed -e "s/LOGJOUR/"$logjour"}/g" $maildir/mail.html
et comme ça aussi au cas où...
sed -e 's/LOGJOUR/'$logjour'}/g' $maildir/mail.html
# retour de mon echo $logjour
Posté par manueb . En réponse au message Commande sed changer un mot par la valeur d'une variable. Évalué à 1.
C'est en fait des ligne de log de backuppc...
2018年02月15日 TEST 2018年02月15日 16:00:01 incr backup started back to 2018年02月14日 15:03:12 (backup #3) for share ebtek$ 2018年02月15日 16:13:37 Output from DumpPostUserCmd: /var/lib/backuppc/logmail.sh: 4: /var/lib/backuppc/logmail.sh: 2018年02月15日: not found 2018年02月15日 16:13:37 Output from DumpPostUserCmd: repertoire de backup 2018年02月15日 16:13:37 Output from DumpPostUserCmd: /var/lib/backuppc/pc/192.168.20.6 2018年02月15日 16:13:37 Output from DumpPostUserCmd: Journal 2018年02月15日 16:13:37 Output from DumpPostUserCmd: 2018年02月15日 16:13:38 incr backup 4 complete, 0 files, 0 bytes, 18 xferErrs (0 bad files, 0 bad shares, 18 other)
J'ai modifier ma commande comme suit et voici ce qu'il me renvoi
sed -e "s/LOGJOUR/"$logjour"}/g" $maildir/mail.html
et comme ça aussi au cas où...
sed -e 's/LOGJOUR/'$logjour'}/g' $maildir/mail.html
sortie :
sed: -e expression n°1, caractère 20: commande `s' inachevée