grep for expression containing variable

后端 未结 1 1892
无人共我
无人共我 2020-11-27 08:17

I want to add this command grep -co \'\\b5\\b\' $INFILE in a bash script. The problem is that instead of 5 i want to use a variable in its place so i write:

相关标签:
1条回答
  • 2020-11-27 08:49

    Use " instead of ' to allow expansion of your $L variable.

    0 讨论(0)
提交回复
热议问题