Pastebin
API
tools
faq
paste
Login
Sign up
SHARE
TWEET
integer-number-check-in-bash-variables-1
tolikpunkoff
Aug 29th, 2016
917
0
Never
Add comment
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!
Bash
0.16 KB
| None
|
0
0
raw
download
clone
embed
print
report
#!/bin/bash
#check integer positive numbers in bash variables
if
(
echo
"$1"
|
grep
-E
-q
"^?[0-9]+$"
)
;
then
echo
"Number"
else
echo
"Not Number"
fi
Advertisement
Add Comment
Please,
Sign In
to add comment
Public Pastes
Custom em_booking_validate for dependent_even...
31 min ago | 1.15 KB
⭐ Exploit Documentation ⭐
CSS | 37 min ago | 1.05 KB
This month smells like money
CSS | 38 min ago | 1.05 KB
✅ API Flaw Money Method
CSS | 39 min ago | 1.05 KB
Untitled
1 hour ago | 22.13 KB
[TLF 18.II] CLEARANCE
18 hours ago | 2.21 KB
felipe - 24.09.2026
23 hours ago | 0.10 KB
Marcos - 24.09.2026
23 hours ago | 0.08 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the
Cookies Policy
.
OK, I Understand
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!