Cycle
For
While
Until
for 变量 in 列表; do 循环体 done
E.g for I in ' seq 1 $FILE '; Do
echo "Hello, ' head-n $I/etc/passwd | Tail-1 | Cut-d ', '-f1,7 ' "
Done
Vim Editor: Edit mode input mode last line mode edit-Input: 1. Open file: vim+ #2. close file: ZZ3. Move cursor: H left L right J down K move in Word: W moves to the next word E jumps to the current or next word ending b jumps to the current or previous word ending Line jump: o Absolute Line end Inline jump: #G跳转至第 # line G jumps to the last line
- Flip screen: ctral +f PAGE Down
+b. Up one page
- Delete a single character d
X: Delete single character at cursor location
#x: Delete # a single character
#dw: Delete # Group of words
DD: Delete the current cursor in the row
6. In the last line mode:
. Indicates when to move forward
$ last line
+ #向下的 # line
7. Paste command: P copy entire line content to below
P Copy entire line contents to top
8. Copy command: yy current line copy
9. First delete and then enter: C
10. Replace: R replaces a single character
R Replacement Mode
11. Undo Operation: U
#u撤销 # Operations
12 split screen display: Ctrl+w,s Horizontal splitter window
Ctrl+w,v Vertical splitter window
ctrl+w,↑↓←→ Switch window
13 Interacting with the shell:! Command
The way of Learning (V): Three statement structures, VIM editor shortcut keys and how to use the Find command