xargs

By Druss , 7 November, 2011

I currently work with an SVN checkout which tracks a separate GIT checkout (for reasons of managerial short-sightedness). When I update my git checkout, I find that the SVN checkout does not like the fact that files deleted by the git update have effectively been removed from the SVN checkout without the use of svn rm. Consequently, it is impossible to commit the updated checkout into the SVN repository.

By Druss , 30 July, 2011

I've previously written a short tip on how to perform batch rename operations using ls, sed, and xargs. One of the issues with xargs is that it breaks down when dealing with filenames which include spaces as it assumes that each word in the filename is a separate argument. Looking around on the Internet threw up a number of solutions mostly utilising find and xargs with the -print0 and -0 switches respectively.

Tags Old
By Druss , 24 January, 2011

Earlier today, I wanted to prefix a number of image files on a server with a 0. If this was on my desktop, I would have simply used a graphical tool such as the excellent Métamorphose. However, in this case, only a command-line was available. While Google threw up a number of bash scripts, I was curious to see if this could be done in a cleaner and more concise manner. Following the excellent reference to sed and more Google magicking, I arrived at

Tags Old

All times are UTC. All content licensed under the Creative Commons Attribution-Noncommercial-Share Alike 3.0 License.