% cat temp
$$$ hello1
$$ hello2
hello3
## hello4
hello5 $$$
% cat temp | grep "$$$"
Illegal variable name.
% cat temp | grep "\$\$\$"
Variable name must contain alphanumeric characters.
%
Quiero grep para $$$
y espero que el resultado sea
% cat temp | grep <what should go here?>
$$$ hello1
hello5 $$$
%
Diferenciar, he marcado el símbolo como %
.
- ¿Cuál es el problema aquí?
- ¿Cuál debería ser el grep string?
Su segundo comando es correcto (con $ escapado), pero debe usar comillas simples, no comillas dobles. –