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

Re: Using svn in a unix pipe

From: Nathan Kidd <nathan-svn_at_spicycrypto.ca>
Date: 2006-05-03 05:28:48 CEST

Garrett Rooney wrote:
>> try this:
>> svn st | grep ^\? | awk '{ print $2 }' | tr "\n" "\000" | xargs -0 -n1
> The problem is that 'print $2' in awk will only print out the second
> field, and by default it splits on whitespace, so if you've got
> filenames with spaces $2 is only the first chunk of it, so I suspect
> that tr won't help...

I find sed is simpler, and avoids whitespace issues:

svn st | sed -nr "/^\?/s/.{7}(.*)/'\1'/p" ...


To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed May 3 05:28:37 2006

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

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