Challenges
Vim command sequence
Misc
Medium
Vim editor
Solves: 4
Vim command sequence
Author: CyberSamSU
Points
40
The following 5-line file is opened in vim (the cursor is on line 1):
kirish qatori
AAAAAAAA
orada turgan keraksiz qator
BBBBBBBB
yakun qatori
The user sequentially executes the following commands:
1) :%s/AAAAAAAA/M1X_VIM/
2) :%s/BBBBBBBB/_USTASI/
3) 3G
4) dd
5) 2G
6) gJ
:%s/eski/yangi/— replaces in all lines of the fileNG— goes to line N (for example3G— to line 3)dd— deletes the current linegJ— joins the current line with the next line without spaces
After all commands are executed, what will be the final text of line 2?
To submit a flag, log in.