Question: Vi 1) Redraw/refresh the vi screen. 2) Join lines 1 and 2 of the file. 3) Replace each occurrence of // with ** with a
Vi
1) Redraw/refresh the vi screen.
2) Join lines 1 and 2 of the file.
3) Replace each occurrence of // with ** with a single substitution command.
4) Insert a 5 into the fifth column of all lines containing at least 5 letters using a single substitution command.
5) Add @@ to the beginning of lines 1-30 (do not remove anything) using a single substitution command.
6) Add +++ to the end of the line for lines 31 to EOF (do not remove anything) using a single substitution command.
7) Cut the first 20 lines of the file and paste them at the end of the file. Use the named buffer 'a' for these commands.
8) Set a marker called 'b' at line 20.
9) Move the cursor to the end of the current line. Do NOT go into insert mode.
10) Move the cursor to the end of the file. Do NOT go into insert mode.
11) Go to the line where marker 'b' is set using the line mark syntax (e.g. 20G or :20 is NOT an acceptable answer).
12) Execute the command 'ls -l' on the file WITHOUT exiting vim. Do NOT replace any lines with the output of the ls command.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
