I want to add this command grep -co '5' $INFILE in a bash script. The problem is that instead of 5 i want to use a variable in its place so i write:
V=`grep -co '$L' $INFILE`
but it does not work since the $ is used to describe internally the end of line in grep. How can i make it work? Is there an escape sequence for $ to make it use its bash meaning of the value of a variable?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…