Answers for "grep to variable"

0

grep to variable

VAR=`command-name`
VAR="`grep word /path/to/file`"
## or ##
 
VAR=$(command-name)
VAR="$(grep word /path/to/file)"
Posted by: Guest on November-20-2020

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language