I want to execute this condition
while [ $(cat /path_of a file/) -eq 1 ]
The condition is only correct if
$(cat /path_of a file/)
is an integer and not a string !
How can I overcome this problem ?
I want to execute this condition
The condition is only correct if
is an integer and not a string ! How can I overcome this problem ? |
||||
|
You can do this with Using |
|||||
|
Variable in bash is untyped. If you want the condition to always get evaluated with integers, you can use
So your example becomes:
A note that if you have |
|||||
|