GnuWin32 Trick: Quickly Finding Text in File

The downside of not managing a good library of scripts is forgetting where some code is written.  Case in point: I wrote a nice RMSE script, but I forgot where it was.

So I found it with the following command line:

grep "rmse" $ls -R ./*/*.R ./*/*.r

The first part of the script - grep "rmse" - tells the grep command to look for rmse.  The second part - $ls -R .//.R .//.r - tells what files to look through (that command is list recursive looking for *.R and *.r files).

Tags: , , , , , ,

Comments from Other Sites

Comments are closed.