[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r9106 - trunk/contrib/client-side

From: Florian Weimer <fw_at_deneb.enyo.de>
Date: 2004-03-18 11:21:13 CET

breser@tigris.org wrote:

> Add a shell script that makes grepping a working copy painless. No more
> worrying about the admin dirs or text-base.
>
> * contrib/client-side/wcgrep
> New file.

Nice. Here's a suggestion for two changes.

* contrib/client-side/wcgrep
  Document GNU findutils and GNU grep dependency.
  Pass -H option to grep to always print the file name. Otherwise, it
  could happen that xargs invokes the last grep process with only one
  file argument, and grep doesn't print the file name by default if just
  one file is searched.

Index: wcgrep
===================================================================
--- wcgrep (revision 9107)
+++ wcgrep (working copy)
@@ -11,6 +11,8 @@
 # If no path is given the current working directory is searched not stdin.
 # Other than that it will take any parameter or pattern your standard grep
 # does.
+#
+# This script requires GNU findutils and GNU grep.
 
 arg_count=$#
 for (( i=1; i <= $arg_count; i++ )); do
@@ -33,4 +35,4 @@
 done
 
 find $pathargs -regex '.*~$\|.*/\.svn\(/\|$\)' -prune -o -type f -print0 | \
- xargs -r0 grep $grepargs $pattern
+ xargs -r0 grep -H $grepargs $pattern

-- 
Current mail filters: many dial-up/DSL/cable modem hosts, and the
following domains: atlas.cz, bigpond.com, freenet.de, hotmail.com,
libero.it, netscape.net, postino.it, tiscali.co.uk, tiscali.cz,
tiscali.it, voila.fr, wanadoo.fr, yahoo.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Mar 18 11:21:47 2004

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.