On 5/2/06, Steven Elliott <steven.s.elliott@gmail.com> wrote:
> I realize that not all command line commands can be used in a unix pipe.
>
> But it would really help me not only satisfy an itch but help in my
> development process if someone here more knowledgeable in unix could give me
> a hint.
>
> What I am trying to do is take the output of "svn st" and pipe that back
> into "svn add" or "svn del" or...
>
> I have so far got
>
> svn st | egrep "\?" | sed 's/\?\(.*\)/ \1/' | svn add
>
> So svn is outputting to egrep which is taking all the files marked "?" and
> sending that to sed to strip off the "?" (which could be "!" ..etc) which I
> would then like to send to svn add (or delete or...).
>
> Problem is the stdout is not making it to the add argument.
>
> Any help would be appreciated.
I suspect your sed command isn't working, if you drop the | svn add
off the end you'll see that there just isn't any output at that point.
Note that I do something very similar with awk all the time:
svn st | grep ^\? | awk '{ print $2 }' | xargs svn add
And it works just fine (assuming there aren't any spaces in your
filenames anyway).
-garrett
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue May 2 22:31:06 2006