Search
 
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
Name
4+7 =