Closed
Description
It seems that the Bash trims spaces before integer comparison:
> if [ " 14 " -lt "22" ]; then echo "true"; fi
< true
> if [ " 14 " -eq "14" ]; then echo "true"; fi
< true
The sh/interp uses strict comparision rules and does not use any space trim functions before the binary tests that are defined in interp/test.go
(binTest
func, atoi
).
Metadata
Assignees
Labels
No labels
Activity