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:
xargs deals badly with special characters (such as space, ' and "). To see the problem try this:
touch 'not important_file'
ls not* | xargs rm
Parallel https://savannah.nongnu.org/projects/parallel/ does not have this problem.
There are 5 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.