free hit counter

Thursday, October 29, 2009

vi after 15 years

I've always managed to install my beloved XEmacs, or limp along on with gnu emacs, kate, kwrite, pico, or joe, but today after some 15 years using unix, I finally did it: 30 minutes of sustained editing with vi across several files.

The verdict? Not so bad really.

Years ago, why didn't I spend the 10 minutes it takes to get familiar with vi?

Labels: ,

Thursday, January 12, 2006

awk: yet another reason to love UNIX

So in past lives I have often used perl -ne to take care of super simple text processing, but for some reason I haven't gotten around to installing it in on my new machine yet.

I figured it might be faster to look at awk before installing perl, as it's already on my system. Even thought I've never used it before it took less than 15 minutes to get my text processing needs done.


#get the current revision number of the subversion repository
RepositoryRev=`svn info . | awk '/Revision:/ {print $2}'`


# count the number of modified files from the subversion repository
modifiedFileCount=`svn status .. | awk '/^M/ {numModified++} END {print numModified}'`


Linkage

Labels: