mardi 30 janvier 2018

Getting an error while subtracting variables

I am writing a bash script and i get an error when i try to subtracts 2 variables. I tried many ways of declaring the subtraction as a single variable, but i am constantly getting errors. What's the right way to declare the variable? Thanks in advance.

if [ ${$packets1 - $packets2} -gt 30 ]

Aucun commentaire:

Enregistrer un commentaire