awk -f filename
When you use a single file as input to the grep command to search for a pattern, it won’t print the filename in the output. Now write a grep command to print the filename in the output without using the ‘-H’ option.
grep pattern filename /dev/null The /dev/null or null device is special file that discards the data written to it. So, the /dev/null is always an empty file. Another way to print the filename is using the ‘-H’ option. The grep command for this is grep -H pattern filename
grep -l term * The ‘-l’ option make the grep command to print only the filename without printing the content of the file. As soon as the grep command finds the pattern in a file, it prints the pattern and stops searching other lines in the file.