I accidentally added dozens of backup files to SVN and would like to recursively revert all files matching a given pattern (*.~sql)
On UNIX, I'd simply use a
svn revert `svn status .|grep "~sql$"|awk '{print $2}'`
which is a variation of one of the answers to How do I 'svn add' all unversioned files to SVN?
Using Powershell, I came up with
svn status|findstr "~sql" | %{ $_.Split('`t')[1]; }
but this seems to cut of the first characters of the filenames (e.g. I get ch_sys.~sql instead of scratch_sys.~sql).
What am I missing here? Or is there a more Powershellish way of doing this?