Sunday, October 19, 2008

pasting code in vim

:set paste

paste the code

:set nopaste

set pastetoggle=F3 in your vimrc file is an alternative.

Friday, October 17, 2008

Renaming Files in Linux

Type the following on commandline of a bash shell and change the logic as needed.


for i in `ls /home/ssinghal` ; do mv "$i" "$i.new" ; done