Posts

Showing posts from August, 2016

Use of xargs in linux

Hi all, In order to copy files from one folder to another in linux - try using the following command xargs -a <filename of file containing list of files to copy> cp -t <destination folder> This is better than using cat <filename of file containing list of files to copy> | xargs -d '\n' cp -t <destination folder>

VIM Commenting - Speed up

Hi all, Are you facing problems with commenting in code using VIM? Here's a nice little trick which proved to be very helpful in my coding experience with VIM editor. Lets say you want '#' character repeated 100 times to make your code look more neat. Then all you have to do is In the insert mode type <C-o>100i#<Esc>. C-o means you have to type CTRL + O. # is the character you want to repeat. ESC - to get your output. And you will have # repeated 100 times. This can be done for any character # - needed in bash scripting, python % - Matlab commenting // - C coding. Source : - http://stackoverflow.com/questions/5054128/repeating-characters-in-vim-insert-mode