Bonjour, j'ai un probleme d'affectation de commande avec mon script et je ne sais pas d'ou il vient :
Mon script :
Lors de l'execution de mon script il m'execute a chaque fois la commande dans ma variable clean peu importe la date et pourtant ma conditionnelle marche.
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 #! /bin/sh today=0 today=`date +%d` echo $today set clean = `rm -f -r \`ls | grep -v -e^dataC.*sh$ | grep -v -e^DataOf[0-9]*-[0-9]*-01$\`` if [ "$today" == 01 ] then { $clean echo "log files have been cleaned" } else echo "Date has been checked" fi
Quelqu'un pourrait-il m'expliquer d'ou vient mon erreur svp?
Partager