matching a line with a literal asterisk “*” in grep January 6, 2024 by Tarik Try a character class instead echo "$STRING" | egrep '[*]'