{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

hw1 - CS2044 HW1 CS2044 Homework 1 February 27th 6pm Submit...

Info icon This preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
CS2044 HW1 February 21, 2009 CS2044 Homework 1 Due: February 27th, 6pm. Submit solutions to CMS, http://cms.csuglab.cornell.edu . Problem 1: Word Frequencies. Turn in index.sh and update.sh . Problem 2: Interview Question. Turn in interview.sh . Introduction Welcome to CS2044! The goal of this assignment is to get you comfortable with commonly used UNIX tools. After the assignment, you should be familiar with the following concepts. Input/output redirection. Use of pipes and pipelining to simplify your scripts. Use of special characters in the shell. Regular expressions. Variables, both shell variables and how to use your own. Passing arguments to a script, and using them inside the script. Of course, it is not expected that you become an expert on these topics. Rather the purpose is to have you gain enough confidence that you can make use of these tools for the rest of the course, and will know where to look when you are in need of more information. Guidelines It is helpful to write scripts modularly , which means to break the original problem into subproblems and write a separate script for each subproblem. The initial task can then be solved by pipelining the small scripts. Please comment your code. Not only is it helpful for others, but chances are that down the road you may need to rerun your old scripts and your own comments become indescribably valuable. It can make the difference between just tweaking some parameters, and having to tackle and code the whole task again. I suggest using the following header for all your scripts. #!/bin/bash # Created on [date] by [name] # Purpose of script: [description] # Usage: [how to run the script, e.g. script -option <datafile>] Hint: In this assignment, it will be helpful to study the man pages for sort , uniq , wc , sed , tr and grep . 1
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
CS2044 HW1 February 21, 2009 Problem 1: Word Frequencies What happens when we enter, say “Quixotry”, into a search engine? How can the computers rank the relevance of the contents on the pages of the Internet to this particular query?
Image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern