Archive

Posts Tagged ‘sed’

Magical SVN Remove

August 6th, 2006

Have you ever wanted to batch remove some Subversion files? Try this on for size:


svn rm `svn stat | grep ! | sed -e 's/^\!\s\+//;s/$/ /' | tr -d '\n'`

That will remove all the entries from svn stat that start with !. Very handy. Took a few minutes to write (sed wouldn’t get rid of my newline, so I used tr …), but it’s worth it.


Uncategorized , , ,