lundi 1 juin 2015

Bash error on if statement

I have an error in my bash script when I do a if control between a string and a script read function

 #! /bin/bash

test1="false"
while [ $test1 == "false" ]; do
tail -1 demo.txt | while read test
do
echo $test
done
if [ "test" == $test  ]; then
        test1="true"
        echo "end"
else
        test1="true"
        echo "else"

fi
done

Aucun commentaire:

Enregistrer un commentaire