Entrepreneur Geek

Nirav Mehta on life, technology and future

Archive for December, 2007

Good reads for the last day of the year!

without comments

It’s the last day of 2007, and everyone is busy writing 2008 predictions, or celebrating. Since I am busy celebrating, I will rather point to two good reads for this last day of the year!

I know, I should include more links.. But we have a year end party in the office, and I want to get back to it ;)

Written by Nirav

December 31st, 2007 at 2:47 pm

10 Resolutions to boost your business

without comments

It’s New Year around. And it’s time to make some new resolutions!

Read an interesting article from Miles Burke on SitePoint about 10 Resolutions to boost your business. All of them are true! Many would be what you already know! But we often miss them in the daily chores!

Here’s a summary:

  1. Start setting goals.
  2. Ask a client for a referral.
  3. Focus on profit, not turnover.
  4. Learn something new about business.
  5. Take time for yourself.
  6. Create products that generate income.
  7. Delegate effectively.
  8. Focus on client service.
  9. Take time to wander the Web.
  10. Build rock-solid procedures.

Written by Nirav

December 29th, 2007 at 5:12 pm

Search and Replace Recursively using sed and grep

with 10 comments

I have done this so many times, still I find a new problem doing recursive search and replace each time! Here's one small shell script that puts the issues I had on the Mac doing search and replace on a directory recursively.

Save the file as rpl.sh, chmod it 755, and execute it like:

CODE:
  1. ./rpl.sh folderContainingFiles/ oldText newText

Does the job for me! This could be done in a single line, I got some ideas of using xargs etc, but all that did not work on my Mac (at least). So resorting to this.

CODE:
  1. #!/bin/sh
  2. grep -rl $2 $1 |
  3.  while read filename
  4.  do
  5.  (
  6.   echo $filename
  7.   sed "s/$2/$3/g;" $filename> $filename.xx
  8.   mv $filename.xx $filename
  9.  )
  10.  done

And yes, if you are going to use this, take a little time and do some argument checking before passing them around! Unless you think only a God user like you is going to use it!

Written by Nirav

December 29th, 2007 at 1:21 pm

Posted in Apple, GNU/Linux

Men & Women – Thinking and Speaking

without comments

Men think to organize their ideas. Women speak their ideas to organize them!

Written by Nirav

December 27th, 2007 at 8:53 am

Merry Christmas

with 3 comments

Merry Christmas

Written by Nirav

December 25th, 2007 at 2:23 pm

Posted in General