commandlinefu.com is the place to record those command-line gems that you return to again and again.
You can sign-in using OpenID credentials, or register a traditional username and password.
Subscribe to the feed for:
handels @, ?, whitespaces in names.
replace "?" and "add" by "!" and "rm" for svn mass remove.
---> I m looking for a nicer way to write it, perhaps with something using " perl -ne '`blahblah` if /\?(.*)/' "
There are 9 alternatives - vote for the best!
checks which files are not under version control, fetches the names and runs them through "svn add". WARNING: doesn't work with white spaces.
With the force options the same results can be achieved
No need for grep, let awk do the match. This will not behave properly if the filenames contains whitespace, which is awk's default field separator.
This version makes uses of Bash shell expansion, so it might not work in all other shells.
If you can do better, submit your command here.
You must be signed in to comment.