Closed tpoindex closed 4 years ago
Thanks for the PR. :+1:
There are some lint errors to fix:
warning: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. [SC2166]
note: Double quote to prevent globbing and word splitting. [SC2086]
Your one liners also change what the functions return (they should return Never-mind!0
for success and 1
for error).
I've pushed modifications of this method to master, thanks for the PR! :+1:
https://github.com/dylanaraps/pure-sh-bible#check-if-a-number-is-a-float
Hey Dylan,
Great stuff with your pure-sh and pure-bash bibles. Lots of cool stuff in both that I've managed to ignore over many years of slinging shell scripts - no longer!
Here's a small change you might consider. I've tested in dash and bash. Perhaps also include in pure-bash-bible?
Cheers, Tom
My tests: