Coder Social home page Coder Social logo

bvasilop / wats1030-manipulating-text Goto Github PK

View Code? Open in Web Editor NEW

This project forked from suwebdev/wats1030-manipulating-text

0.0 1.0 0.0 146 KB

An assignment based on editing text using command line text editors.

License: MIT License

HTML 100.00%

wats1030-manipulating-text's Introduction

wats1030-manipulating-text

An assignment based on editing text using command line text editors.

For this assignment, you must use three different text editors from the command line of your Digital Ocean Droplet. (You should still have the Droplet from the previous assignment. The instructions here will assume you are using an Ubuntu 14.04 server to complete this work.)

Pre-Requirements

In order to complete the Basic Requirements below, you will need to verify that all three editors are available to you. For this assignment you will need to complete the basic requirements in each of the three editors.

Nano

Nano is generally considered the easiest command line editor to use. There are only a few commands available and it is based on the editor that was included with the popular email software, Pine (which people used to use on Unix servers to check their email).

To check for nano, try to run it:

nano

If nano is not there, you can install it by running:

apt-get install nano

Emacs

Emacs was created with an eye towards "editor macros" (hence the name), and it remains strong with many macros available to tie emacs in to all sorts of systems and processes. It is a very flexible editor, with an idiosyncratic interface that is not like any other application.

To check for emacs, try to run it:

emacs

If emacs is not there, you can install it by running:

apt-get install emacs

Vi

Vi is a "mode-based" editor, meaning that it starts looking at files in "view" mode and you must switch into "interactive" mode to edit them. Vi is also designed to keep your fingers on the home row as much as possible, and fans of Vi love that they can use all sorts of keyboard shortcuts to navigate precisely within files. Like Emacs, Vi is not at all like any other text editor you've probably used.

Vi should be included in your system already, but you can check for it and install it just like the other packages. Check for it by trying to run it:

vi

If vi does not work, then install it:

apt-get install vi

Basic Requirements

Once you have all of your editors available on your Droplet, you can begin working on the tasks outlined below. There are three directories in this repo:

emacs/
nano/
vi/

You will work through this set of tasks in each of the three directories, allowing you to experience the differences between these three editors. Files have been copied into each directory already, so you have fresh files to work with in each directory. As you work through the tasks, be sure you are editing files in the correct directory.

  • Create a new file called unix_philosophy.txt and type in the text from the unix_philosophy.pdf file.

  • Open the file power_of_unix.html and remove all of the HTML tags. Save the file with a new filename: power_of_unix.txt. (Hint: You can zap those pesky comments with a "delete line" command in some editors...)

  • Open the file gancarz_unix_philosophy.txt and correct the typos of beautiflu and effishingly. Save and close the file when you're done.

  • Open the file 17_rules.txt and remove all of the bracketed footnote numbers left over from the copy/paste of text. (The footnote numbers look like this: [12]. They are sprinkled throughout the file. You could probably use some kind of search or find function to get them all...)

  • Update example.httpd.conf to have the following settings:

<VirtualHost *:80>
DocumentRoot /www/unix
ServerName www.unix.com
</VirtualHost>

<VirtualHost *:80>
DocumentRoot /www/linux
ServerName www.unix.org
</VirtualHost>
  • In the short story "The Machine Stops" (contained in the the_machine_stops.txt file), the main characters are Vishta and Kuno. How many times does the word "Vishta" show up in the short story? How many times does the word "Kuno" show up in the short story? Add your word frequency counts to the wordFrequency.json in each of the working directories. (Be sure to count the unique the_machine_stops.txt file in EACH directory -- they are not the same!)

  • Create a file in the root of this repository (the same level as this README.md file) called favorite.md and write a statement about which editor you prefer. Be sure to discuss what you like and dislike about the editor, and give some sense of your evaluation compared to the other text editors you've tried in this project. (Obviously, you should use your favorite editor to create, edit, and save this file. Please also feel free to use Markdown formatting and links to enhance your text.)

Stretch Goals

  • Play Tetris in Emacs. Add a screenshot of you playing Tetris in Emacs to this repository (possibly using SCP to transfer the file, or uploading the file in another way).
  • How do you turn on line numbering in Vi? Emacs?* ** To turn on line numbering in vi, press escape key followed by : then enter the command 'set number' the numbers will appear on the left hand side of the page. Every time you press return, a new number is added. For emacs if you want the current line number 'M-x line-number-mode' for the rest of the line numbers 'M-x linum-mode'**
  • Explore the Emacs file browser mode. Describe how it works here.* To enter file browser mode in emacs, Use C-x d to enter dired mode. use C-s to search for a file name.use j and then enter the name of the file or directory, and the cursor will jump to that point. You can also use > and < to move to the next or previous sub directory. Hitting ^ moves you up a level in the directory. To open a file, move the cursor to the line containing a file and hit enter. To create a new subdirectory, hit +, and to create a new file in the directory, use C-x C-f.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.