Posts by Guariba Som • 11 points
1 post
-
1
votes5
answers1617
viewsA: Check if variable is a positive integer
I believe that the @stderr method is the simplest because it uses directly the output status of the 'expr' command, as well as being portable. Simplifying a little more: [ `expr "$var" + 0…