hy!
I would like to know how can i ckeck the input if its a number or if its a text?

cristi2008
Recommended Answers
Jump to PostHey there,
This will tell you if your variable is text (a through z) - so your else would cover everything else :)
[[ "$variable" == +([a-zA-Z]) ]] && echo "$variable is character"
just put that in whatever if-else or other testing construct you want and you should be …
All 3 Replies
eggi 92 Posting Whiz
DimaYasny 180 Godmode enabled Team Colleague Featured Poster
eggi 92 Posting Whiz
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.