Unix - Hour 11

Advanced vi Tricks, Tools, and Techniques 

11.1.1) Typed 'vi README2' to open a long file. Typed G and moved to the last line
        Typed 3G and moved to the third line.
11.1.2) Typed / and the cursor moved to the bottom of the screen, typed '/first'
        followed by enter and the cursor jumped to the specific word. 
11.1.3) Typed n and vi jumped to the next occurrence of 'first' in the file.
11.1.4) Typed ?first and if searched for 'first' in backwards direction.
11.2.1) Opened 2 files to edit and vi showed the first one in the screen.
internet% vi buckaroo README2 
11.2.2) Typed :w newfile and it created a new file called newfile.
~
~
:w newfile 
11.2.3) Used :r to insert a file (the current one) inside of the current one.
:r newfile
This is a test file created using Cygnus Solutions that emulates UNIX under the
Windows environment.

This is a test file created using Cygnus Solutions that emulates UNIX under the
Windows environment.

It seems to work pretty good. This file is going to replace the buckaroo file on
ce the internet.ggu.edu server is constantly getting down this week.

I hope the teacher talks to the unix administrator because it's a shame that we
cannot use the server after 11:00 pm.

It seems to work pretty good. This file is going to replace the buckaroo file on
ce the internet.ggu.edu server is constantly getting down this week.

I hope the teacher talks to the unix administrator because it's a shame that we
cannot use the server after 11:00 pm.
~
~
"newfile" 6L, 371C                                            3,1           All
11.2.4) Saved the file with another name
...
~
:w buckaroo.confused
...
~
"buckaroo.confused" [New] 12L, 742C written                   3,1           All
11.2.5) Typed :n to move to the next file and vi displayed the content of the
        second file.
This is a test file created using Cygnus Solutions that emulates UNIX under the
Windows environment.

It seems to work pretty good. This file is going to replace the buckaroo file on
ce the internet.ggu.edu server is constantly getting down this week.

I hope the teacher talks to the unix administrator because it's a shame that we
cannot use the server after 11:00 pm.
~
~
"newfile" 6L, 371C                                            1,1           All
11.2.6) Typed ':e buckaroo' and it opened the first file again.
        Typed ':n' and it opened the second file.
        Typed ':n' again and got the following message: Cannot go beyond last file
11.3.1) Opened the file in read-only mode and tried to edit it. It allowed edition
        but did not allow me to save the modifications.
This is a test file created using Cygnus Solutions that emulates UNIX under the
Windows environment. It works perfectly

It seems to work pretty good. This file is going to replace the buckaroo file on
ce the internet.ggu.edu server is constantly getting down this week.

I hope the teacher talks to the unix administrator because it's a shame that we
cannot use the server after 11:00 pm.
~
~
-- INSERT -- Warning: Changing a readonly ffile
11.3.2) It opened the file in the line that contained the specified path.
$ vi +/ggu.edu newfile
11.3.3) It opened the file in the fifth line but it ignored the blank lines.
$ vi +5 newfile
This is a test file created using Cygnus Solutions that emulates UNIX under the
Windows environment. It works perfectly

It seems to work pretty good. This file is going to replace the buckaroo file o
ce the internet.ggu.edu server is constantly getting down this week.

I hope the teacher talks to the unix administrator because it's a shame that we
cannot use the server after 11:00 pm.
~
~
11.4.1) Typed :s/Solutions/Technologies and vi substituted the word Solutions by
        the word Technologies.
This is a test file created using Cygnus Solutions that emulates UNIX under the
Windows environment. It works perfectly

It seems to work pretty good. This file is going to replace the buckaroo file on
ce the internet.ggu.edu server is constantly getting down this week.

I hope the teacher talks to the unix administrator because it's a shame that we
cannot use the server after 11:00 pm.
~
~
~
:s/Solutions/Technologies
This is a test file created using Cygnus Technologies that emulates UNIX under t
he Windows environment. It works perfectly
...
11.4.2) It changed all occurrences of word This by Thissss. 
Thisssss is a test file created using Cygnus Technologies that emulates UNIX und
er the Windows environment. It works perfectly

It seems to work pretty good. Thisssss file is going to replace the buckaroo fil
e once the internet.ggu.edu server is constantly getting down this week.

I hope the teacher talks to the unix administrator because it's a shame that we
cannot use the server after 11:00 pm.
~
~
:1,$ s/This/Thisssss                                          3,1           All
11.4.3) Typed u and vi undo the changes.
11.5.1)
11.5.2)
11.5.3)
11.5.4)
11.5.5)
11.5.6)
11.5.7)
 
1