Bonjour à tous,
Voila, je pense que la meilleure facon de solutionner mon probleme serait d'utiliser un script awk.
Je vous expose le 'probleme' :
J'ai un fichier (input) contenant des lignes comme suis :
/monsite/monpath/monsouspath/monsoussouspath/monfichier
/monsite/monpath/monsouspath/monsoussouspath/
/monsite/monpath/monsouspath/monsoussouspath/unautrefichier
/monsite/monpath/monsouspath/monsoussouspath/encoreunautrefichier
/monsite/monpath/monsouspath/monsoussouspath/
/monsite/monpath/monsouspath/monsoussouspath/
/unautresite/monpath/monsouspath
/unautresite/monpath/monsouspath/unfichier
et je voudrais que mon script awk matche toutes les lignes contenant "/monsite/monpath/monsouspath" et que la ligne ne se termine pas par un "/" (et donc se termine par un nom de fichier) et que ce soit (…)
Forum Programmation.shell script awk
21
juin
2005