hw1 - CS2044 HW1 February 26, 2010 Surviving Your End Of...

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

View Full Document Right Arrow Icon
CS2044 HW1 February 26, 2010 Surviving Your End Of Semester Grading Meeting Due: March 5th, 6pm. Submit solutions to CMS, http://cms.csuglab.cornell.edu . Problem 1: Basic Histogram. Turn in basichistogram.sh Problem 2: Advanced Histogram. Turn in histogram.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. A variety of unix commands 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
Background image of page 1

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

View Full DocumentRight Arrow Icon
CS2044 HW1 February 26, 2010 Problem 1: Basic Histogram Congradulations! You have completed your first semester as a teaching assistant in a class of 578 students at Whassamatta U. You are in the final grading meeting, bored out of your mind as you listen to the Professor in charge of the course explain how you are going to create a histogram on
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This document was uploaded on 03/15/2010.

Page1 / 4

hw1 - CS2044 HW1 February 26, 2010 Surviving Your End Of...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online