dimanche 20 août 2017

For this statement, why could I get the error "[: too many arguments"? I am sure I use the "[ ]" correctly in the shell

here is my code :

if [ -e vivado*.backup.log ]; then
    rm vivaod*.backup.log
fi

The output message is "[: too many arguments"

More curious, same code below can work perfectly:

if [ -e vivado*.backup.jou ]; then
     rm vivado*.backup.jou
fi

I tried many times and many solutions, but got same error. what should I do now ? thankyou ~

Aucun commentaire:

Enregistrer un commentaire