How to add text on top of documents

The other day we had to add additional text on top of each document. Actually what was needed is to add the GPL information into every source code file. Now, with an application that consists of about 6000 documents the tasks was to do this the simplest way possible.

Maybe some of us, were looking to far, but the solution was right at our hands. It was no additional application, it was no additional script, simply put it was one of my favorites, the “Regular Expression” that did the job.

Regular Expression allows you to find and change text that matches a set of conditions you specify. So with that in mind using;

“^A”

will match at the beginning of the document (as opposed to ^, which matches at the beginning of the document and also at the beginning of each line).

Our favorite Text-Editor on MacOS X is still BBEdit. BBEdit features a very powerful Grep Search & Replace panel. With it, using the above Regular Expression and adding the GPL information to 6000 documents was a very easy task.

If you enjoyed this post, make sure you subscribe to my RSS feed!

Tags: , ,

About Razuna

This is the official blog of the Open Source Digital Asset Management System - Razuna. Razuna is the incredible easy way to manage all your Digital Assets. As the Open Source Alternative to Digital Asset Management (DAM) System you can save up to 90% with Razuna compared to any proprietary System. By using Razuna you get the benefit of it being free and open source and supported by a professional company. There are many options to try out Razuna today! Either, download your own version, create a free account on our Razuna Hosted Platform or get your own Razuna Cloud Server.

No comments yet.

Leave a Reply

You must be logged in to post a comment.