{ 2 comments… read them below or add one }

Matt Smith July 18, 2010 at 8:28 pm

Linux Box means the server/computer they are running linux on.
Assuming your doing this from your own computer. What you can do is access his linux server. (he should’ve given you…..like a ip address/domain name. Most universities have an account you can access. through a program called "Multilab". Or you can use WINSCP to access the files on your account if your given a domain name.

VI is just simply a unix text editor, it’s pretty simple to use.

Are you doing this…..from your own computer? or are you supposed to log into the schools server or what?
References :

thundercats July 18, 2010 at 9:13 pm

I see two tasks that your professor wants done. The first is to get the file uploaded to your *nix account. You can accomplish this by emailing the file to your *nix account email address or you can putty to the server, open vi, and paste (right click) the text into the vi editor.

Your second task is doing search and replace in the vi editor. There are so many ways to achieve this. I’ll show different methods and you decide what to use. The whole purpose of this assignment is for you to get familiarized with the vi editor.

"Bill Gates" with "Mr. Noodles",
:%s/Bill Gates/Mr\. Noodles/gc
This searches every instance of "Bill Gates" and replaces it with "Mr. Noodles" only if you press "Y" to confirm (the "c" at end of command).

"Gates" with "Noodles",
/Gates
This searches the word "Gates". Next,
cwNoodles<ESC>
This changes the word to "Noodles". This only changes the first appearance of the word "Gates". To continue,
n.
The "n" takes you to the next "Gates" word and the period repeats your last command, which was to replace with the word "Noodles".

"Paul Allen" or "Allen" as "The Other Guy",
/Paul Allen
2cwThe Other Guy<ESC>
n.
:%s/Allen/The Other Guy/g
References :

Leave a Comment

Security Code:

Previous post:

Next post: