I'm trying to learn regular expressions, and so I created a file with some characters in it. When I use the cat command and pipe it to rgrep command with an argument to filter out text, the resulting output is "filename:filtered_text".
cat regex.txt | rgrep -E '^a'
Not only that it also checks for other files in the folder and if they match the regular expression it shows them as well, even though I only piped a single file.
How do I get a normal output with only the contents of the file I've passed into cat?