Tuesday, February 8, 2011

Using sed

For searching and replacing text in a file

sed 's/<text to be searched>/<replacing text>/' <input file>
For example sed 's/foo/bar/' test, replaces the word foo with bar in the file test

Monday, February 7, 2011

SVN Quick Reference


  1. SVN Properties
  • SVN Externals (svn:externals)
Setting this property works like a soft link in the unix file system. Assume we have an application that uses some common utilities which are located in a different path in the repository. Using this properly we can create a soft link to the common utilities from our current application. So anyone who checks out the application will also get the common utilities automatically through  this link. It looks as though the common utilities are present as part of the application.

To set the property
svn propset svn:externals <local dir> <repository>

To get the property. Go the directory containing externals
svn propget svn:externals 

To update the property. Make sure the SVN_EDITOR environment variable is set to a valid editor ( for e.g export SVN_EDITOR=vi). Go the directory containing externals and type the following.

svn propedit svn:externals .

The editor will open where you can modify the external symbols. 
Use svn update to get the updated version and then svn commit to commit the changes.