4 ms·
Can an "empty" variable have a length greater than zero? In Bourne once scripts I have been testing test ${#var} -gt 0 and test ${#var} -ge 1 In the p
by gwu78 9y ago
Can an "empty" variable have a length greater than zero?
In Bourne once scripts I have been testing
test ${#var} -gt 0 and
test ${#var} -ge 1
In the past I have seen others use
test x"" = x$var
- feld 9y agoYes, the test to see if "x" matches is the old school trick I was taught