Unix Important command which will Defiantly help you .....:)
Give the Numbring in VI:
:se nu
How to find duplicate:-
/name
Give the Numbring in VI:
:se nu
How to find duplicate:-
/name
vi Find And Replace Text Command
:%s/FindMe/ReplaceME/g
Find and Replace with Confirmation
:%s/UNIX/Linux/gc
Find and Replace Whole Word Only
:%s/\/Linux/gc
Case Insensitive Find and Replace
:%s/unix/Linux/gi
How Do I Replace In the Current Line Only?
:s/UNIX/Linux/g
How Do I Replace All Lines Between line 100 and line 250?
:100,200s/UNIX/Linux/gc
Some Vi Control :-
0 or | Positions cursor at beginning of line.
$ Positions cursor at end of line.
w Positions cursor to the next word.
b Positions cursor to previous word.
( Positions cursor to beginning of current sentence.
) Positions cursor to beginning of next sentence.
E Move to the end of Blank delimited word
{ Move a paragraph back
} Move a paragraph forward
[[ Move a section back
]] Move a section forward
n| Moves to the column n in the current line
1G Move to the first line of the file
G Move to the last line of the file
nG Move to nth line of the file
:n Move to nth line of the file
fc Move forward to c
Fc Move back to c
H Move to top of screen
nH Moves to nth line from the top of the screen
M Move to middle of screen
L Move to botton of screen
nL Moves to nth line from the bottom of the screen
:x Colon followed by a
The basic syntax of AWK:
awk 'BEGIN {start_action} {action} END {stop_action}' filename
awk '{print $1}' input_file
Here $1 has a meaning. $1, $2, $3... represents the first, second, third columns... in a row respectively.
Here $1 has a meaning. $1, $2, $3... represents the first, second, third columns... in a row respectively.
1. Cursor Navigation (if your arrow keys dont work on that old Sun box....) | |
---|---|
J | Next line |
K | Previous line |
H | Left |
L | Right |
Shift+G | Bottom of document |
GG | Top of document |
▲ up
2. Fast Search | |
---|---|
/ | Search Term |
N | Next |
N | Previous |
▲ up
3. Command Mode | |
---|---|
: | enter command mode |
:w | write |
:q | quit |
:q! | quit without saving |
:wq | Write and quit |
ZZ | Write and quit |
:e | open |
Esc | escape command mode |
▲ up
4. From Normal to Edit Mode | |
---|---|
I | Insert at current position |
I | Insert at start of line |
A | Append to end of line |
O | Insert Line Below |
O | Insert Line Above |
S | Delete character at current position and insert |
S | Delete the current line and insert |
▲ up
5. Clipboard | |
---|---|
dw | delete word |
dd | delete line |
P | put after cursor |
P | put before cursor |
yw | copy word |
yy | copy line |
Great stuff provided by the Admin here… look into this for Obiee online training
ReplyDeleteHi,this is Very Nice information Regarding your Software Company and Beautiful Blog Also. So Np compete Also one of the Ios, Android, Java, Devops, UX, Ui, Chat Bot, Company in ChennaiIf you want any job Regarding above Positions,, Please give to Your Queries and send your Resume Back to this mail: sales@npcompete.com
ReplyDelete