Using awk to add new files to svn

svn add `svn status | grep "^?" | awk '{print $2 }'`

you can also use grep -v to exclude specific files

svn add `svn status | grep "^?" | awk '{print $2 }' | grep -v prefs.inc.php`

Leave a Reply