matching a line with a literal asterisk "*" in grep
echo "$STRING" | fgrep '*'
fgrep
is used to match the special characters.
Simply escape the asterisk with a backslash:
grep "\*"
Use:
grep "*" file.txt
or
cat file.txt | grep "*"
Try a character class instead
echo "$STRING" | egrep '[*]'