DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR SHELL
bash get first number from string
#credit to the Stack Overflow user in the source link echo $string1 | sed 's@^[^0-9]*([0-9]+).*@1@'
Source by stackoverflow.com #
PREVIOUS
NEXT
Tagged:
#bash
#number
#string
ADD COMMENT
Topic
COMMENT
Name
2+4 =
Submit