File Management Conclusion
Sample cshrc File
Grep Regular Expression
Pattern Matching - Quiz
editing with vi
Using named buffers to paste between files
Assuming that you entered the command, vi recipe quartet, you can start editing the recipe file as shown
Delete the first line, Grilled Salmon, and store it in a buffer name a.
To do that, type add as the command sequence. The result appears in this image
You plan to paste the buffer contents into the next file, so you use the :n command to go there.
Instead of going to the next file, vi displays the message "No write since last change." That is because you did not save before leaving the current file. A common mistake when editing multiple files.
Enter :w to save the recipe file.
This time, the :n command takes you to the quartet file as you expect.
To put the contents of buffer above the line, type a P as the command sequence. Now the Grilled Salmon appears at the top line.
p: put (paste) the line(s) in the buffer into the text after the current line
When you are ready to leave vi, enter :wq to write and quit.