store grep output in file code example Example: put grep output in a file grep -n "YOUR SEARCH STRING" * > output-file