grep with variable 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)"