I have a scenario like VAR = `Some command brings the file path name and assigns it to VAR`For example VAR can have value like /root/user/samp.txtI want to grep command likegrep HI $VAR This doesnt works gives an error saying cannot open /root/user/samp.txtsame error when tried cat $VAR. How to handle this ?I have given try echo $VAR | grep HIgrep HI $VARUsing korn shell
How to grep over a variable
linux;shell script