In bash, I'm trying to grep a file for a line beginning with a \, and return the result using backticks.
echo \\Hello > myFile out=`cat myFile | grep '^\\Hello'` echo $out
returns nothing, even though
cat myFile | grep '^\\Hello'
returns, as epected.
This seems extremely odd shell behavior. In particular, the anologous command sequence in tcsh does what one would expect:
set out=`cat myFile | grep '^\\Hello'`; echo $out
Could somebody explain what's going on please? Thanks