Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Using Linux Ubuntu Complete Question 3 in Introduction to vi What vi commands wo

ID: 3891711 • Letter: U

Question

Using Linux Ubuntu

Complete Question 3 in Introduction to vi

What vi commands would you use to accomplish the following

Search forward for "string"

Search Backwards for "String"

Change the contents of the current word, (use ESC to stop replacement mode)

Global replacement of string1 with string2

Replace current character with next character typed

Begin inserting text at current cursor location

Begin inserting text at the beginning of the current line

Exit insertion mode and return to command mode

Save the file and exit VI (different than :wq or :wq!)

Return to the last saved version of current file

write lines 1 through 10 to a file called newFile

Write lines 20 through the end of the file and append to the file called newFile

Execute a Linux/Unix command without leaving VI

Read the contents of the file theFile.txt after is has been passed through the UNIX sort commnad

Show line numbers

Explanation / Answer

Search forward for "string" (/)

Search Backwards for "String" (?)

Change the contents of the current word, (cw)

Global replacement of string1 with string2 (:s/string1/string2/g)

Replace current character with next character typed (s)

Begin inserting text at current cursor location (a)

Begin inserting text at the beginning of the current line (I)

Exit insertion mode and return to command mode (Esc)

Save the file and exit VI (different than :wq or :wq!) (ZZ)

Return to the last saved version of current file (:e!)

write lines 1 through 10 to a file called newFile (:1,10wn ewFile)

Write lines 20 through the end of the file and append to the file called newFile (sed command in 'a' append mode)

Execute a Linux/Unix command without leaving VI (:!<LINUX command)

Show line numbers (:set nu)

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote