[svn] Do something with all svn status list files


min read

My profile

Share this:

[code:1:afeefd939d]svn status | grep ^[AM] | awk ‘{print $2}’ | zip ~/Desktop/cr -@[/code:1:afeefd939d]

svn status returns ?, !, A, M, D for “unknown,” “file missing,” “added,” “modified,” and “deleted” respectively. it lists this info in column 1 and the file path in column 2.

Zip all new files (not yet added to SVN):
[code:1:afeefd939d]svn status | grep ^[?] | awk ‘{print $2}’ | zip ~/newfiles.zip -@[/code:1:afeefd939d]


Share this:

Leave a Reply

Your email address will not be published. Required fields are marked *