This post is helpful to all vi / vim user. By this vi command user can remove space at beginning and end of each line . Today, while working I copied huge server list and pasted to new file. Now the file has lots of spaces at beginning and end of most of the lines. […]
vi
vi : Edit file without opening it
In this post I am sharing the trick to edit file without opening it. To achieve this task we will use vi editor. vi is very well known,popular,ultimate and awesome editor and by default available in all Unix/Linux operating system. Syntax: vi -c ‘COMMAND|wq’ /path/of/file Example: We will replace a keyword with new keyword in […]
set and unset line number in file with vi editor
In this tutorial we will learn, set and unset line number in file with vi editor. The same is applicable to vim editor also.(vim is advanced vi editor).vi editor is one of the famous and bydefault file editor in many linux distro. In vi editor you can use regex tricks. To set line number in […]