Skip to main content
The 2024 Developer Survey results are live! See the results

All Questions

2 votes
1 answer
249 views

In bash, grep for a line beginning with \, and assign the result using backticks

In bash, I'm trying to grep a file for a line beginning with a \, and return the result using backticks. For example: echo \\Hello > myFile out=`cat myFile | grep '^\\Hello'` echo $out returns ...
Leo Simon's user avatar
  • 453