bash grep file into var code example
Example: grep to variable
VAR=`command-name`
VAR="`grep word /path/to/file`"
## or ##
VAR=$(command-name)
VAR="$(grep word /path/to/file)"
VAR=`command-name`
VAR="`grep word /path/to/file`"
## or ##
VAR=$(command-name)
VAR="$(grep word /path/to/file)"