Return to Snippet

Revision: 18086
at September 22, 2009 14:57 by hacker


Initial Code
function sgrep() { for r in `svn log $2 | perl -n -e 'print "$1\n" if m/^r(\d*)\s+/'`; do echo "Revision $r:"; svn cat -r $r $2 | grep $1; done; }

Initial URL

                                

Initial Description
usage: sgrep foo svn://my-svn-server/trunk/my-file.txt

Initial Title
function for grepping a string in every svn revision of a file

Initial Tags
svn, Bash

Initial Language
Bash