Bonjour,
Je me sens un peu bete de poster pour ca mais bon ca fait une heure que je suis dessus:
J'essaye juste de tester si une chaine vaut "total"... :s
J'ai essayé :
if $a == "total"
if "$a" == "total"
if [ $a == total ]
if $a = "total"
if [ $a = "total" ]
if [ "$a" == "total" ]
if [ "$a" = "total" ]
rien a faire, je n'arrive pas a trouver la bonne synthaxe, je vous met mon fichier entier au cas ou :
#!/bin/bash
while read line
do
a=`echo $line | awk -F" " '{print $2}'`
if "$a" == "total"; then
echo $line
fi
done < fichierLog
exit 0
Merci de votre aide
