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