Darren Beale Web developer & early adopter

ArchiveDecember 2007

Search and replace multiple files with sed


Ok, if you ‘do’ linux then you’ll probably already know this one. I did, kinda, but had to Google to remind myself of the exact chain of commands. So here I am writing it down so it’s easier to find next time. In my case I had a load of apache conf files where I needed to replace each occurence of an IP address with an asterisk. A combo of find and sed worked well: find...

Moving multiple subversion repositories


I had a need to migrate all of our subversion repositories from an overworked machine onto a new dedicated machine. As I had about 30 repositories to copy over I didn’t fancy doing each dump -> copy -> create -> import manually so I came up with the following. Which, amazingly, worked first time. I’d say a total of an hour elapsed from sitting down to start the job to being...

Move multiple subversion repositories


Need to move multiple subversion repositories?
Well I just finished putting a simple how-to together which details the steps I took when moving our 30+ svn projects from one server to another.
It went really smoothly and took about a quarter of the time I was expecting it to.
Anyway, here it is.

Creating a subversion repository
Automating subversion repository creation

A Blank WordPress Theme


I’ve just uploaded a blank WordPress theme called Naked that I built to assist those (like myself in the past) who have a need to quickly roll-out a WordPress theme with a custom look and feel but may not necessarily have the time to start from scratch. It is purposely very simple and basic, but I’ve put some effort into making it self explanatory and for anyone with experience of...

Removing DOS linebreaks from your files using Vim


This morning I’m debugging an issue on a script that gets cronned every minute. I’ve a shell open on the server and the file in question open using Vim and I notice each line has a trailing ^M…. Aargh the dreaded DOS linebreak. Dusting off my rusty vim-foo I simply do a search and replace using Vim without having to exit the file. The command is: :%s/^M//g Job done, well...

Darren Beale Web developer & early adopter