Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- #check integer positive and negative 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
Advertisement