Posts

Showing posts from May, 2011

vim editor string manipulation, replace string

Every occurrence in file
:%s/<OLD STRING>/<NEW STRING>/g

Change <OLD STRING> to <NEW STRING>, but ask for confirmation first.

:%s/<OLD STRING>/<NEW STRING>/gc


change string between a particular line number
:123,567s/<OLD STRING>/<NEW STRING>/gc

compiling for 32 bit linux OS in 64 bit linux OS

compiling for 32bit in 64bit linux

For 32 bit version :
gcc -m32 -o output32 hello.c

For 64 bit version :
gcc -m64 -o output64 hello.c