LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Hello please help me :) (https://www.linuxquestions.org/questions/linux-newbie-8/hello-please-help-me-4175731577/)

GazL 12-08-2023 05:16 AM

Quote:

Originally Posted by pan64 (Post 6469178)
those should be used together,

Yes, I misread. sorry.

MadeInGermany 12-08-2023 08:32 AM

Numeric? That activates the injection problem again.

My favorite is now
Code:

[[ $n != +([0-9]) ]] && exit 1
Short, readable, fast.
An old bash (<= 4.2 ?) might require globally enabled extended globs:
Code:

shopt -s extglob

GPGAgent 12-08-2023 10:53 AM

I think Crusty has lost interest :-)

GazL 12-08-2023 12:46 PM

One post wonders aren't unusual on LQ. :) Still, we got some value out of the thread.

Turbocapitalist 12-08-2023 12:49 PM

Quote:

Originally Posted by GPGAgent (Post 6469251)
I think Crusty has lost interest :-)

Time for full-out code golf then...


All times are GMT -5. The time now is 03:21 PM.