Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

3
  • stackoverflow.com/questions/806906/… had the quotes backwards Commented Aug 22, 2014 at 17:52
  • if [[ $scale =~ [^0-9] ]] is less convoluted. Doing so, puts the negation in the regular expression instead of the test condition. See below. Commented Apr 14, 2022 at 16:04
  • A POSIX solution might be similar to See below. Commented May 27, 2022 at 1:09