DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR SHELL
grep for substring
output=$(command) [[ $output =~ (CpuIowait=[0-9][.][0-9]{2}) ]] && echo "${BASH_REMATCH[1]}"
Source by stackoverflow.com #
PREVIOUS
NEXT
Tagged:
#grep
#substring
ADD COMMENT
Topic
COMMENT
Name
4+7 =
Submit