How Do I Use Grep
This lesson will teach you how to use the grep command.
Go to the directory that contains the file you want to grep. In the example, the directory is /home/sitecon/sc.
To put the search results into a txt file, type grep "text searched for" filename > txtfile.txt. In the example all of the saleOver results were put into a txt file called saleover.txt.
Searching in multiple files
To search in more than one file, use the grep command as normal, but for the filename, use a wildcard. In the example Pos 1 authorizing 300.00 was searched for in all of the Syslogs in the logs directory.