Skip to content

Category Archives: Programming

Replace tabs in a file with two spaces with perl

Occasionally I run across a source file with tabs in it. There are many ways to remove tabs. I prefer to use perl from the command line. Replace all tabs with two spaces in a command line perl script: And, with bash, do it for all files in a directory that have a tab

Read & Discuss »

Good programmers read a lot

Matt Mullenweg quotes Brent Simmons and Anne Lamott on Programming and Writing. I couldn’t agree more. I always tell newer programmers that they should spend a lot of time reading code. Read other peoples code. Read open source code. Read your own code!

Read & Discuss »

Find the last label placed on a file in clearcase

I’m using ‘cleartool describe’. Passing in a format of ‘%l’ to just grab labels. The sed portions strip off the parentheses and all but the first label. Labels are ordered newest to oldest.

Read & Discuss »