Which of the following vi commands deletes two lines, the current and the following line?
Which of the following vi commands deletes two lines, the current and the following line?
In vi, the command '2dd' deletes the current line and the following line. The 'dd' command deletes the current line, and prefixing it with a number specifies the number of lines to be deleted. Therefore, '2dd' effectively deletes two lines: the one where the cursor is currently positioned and the one immediately below it.
2dd is correct answer
Correct. 2dd deletes two lines the cursor is on
2dd easy to test in vi. Correct! If you press one 'd' it won't do anything.
Answer is B = 2d
Answer is 2dd https://linuxize.com/post/vim-delete-line/
Answer: C