Answers for "grep only number from line"

0

grep only number from line

$ NUMBER=$(echo "I am 999 years old." | grep -o -E '[0-9]+')
$ echo $NUMBER
999
Posted by: Guest on September-13-2021

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language