Bonjour a tous.
exécutant un logiciel et en mettant en argument le fichier log.
j'ai mis au point un petit script qui permet a chaque exécution.
Mon problème est le suivant:
je fait un script qui permet d'incrémenter un nombre au nom de mon fichier log qui est en argument.
ex: nom du log 001_fichier-200509.txt
----------------------------
#!/bin/ksh
set -x
# Déclaration
Numfic=000
Nomfic="_fichier-"
datefic`date '+%Y%m'`
ext=".txt"
# recherche dans le repertoire dernier fichier existant:
rech=`ls -fl | tail -1| cut (…)
Forum Programmation.shell recherche et incremente un numero au fichier
27
sept.
2005