Due: 5:00pm, Friday, August 26. (Note, though: Any submissions by 5:00pm, Friday, September 2, will be accepted without penalty. This is because other students may enter CSCI 230 late.) Value: 25 pts.
In this assignment, we will be studying how to use the Linux command line. It is good to become proficient with the Linux command line anyway, but later in this course we will be studying how Linux interprets and executes commands, so it's important that you start now.
I suggest reading the tutorial
Introducing the
Linux command line
, which provides the information about
using the Linux command line necessary to completing this
assignment.
We will use only Sections 2
through 9 of this document, but of course the remaining sections
are also useful for you to read.
You will need an account on the computer science department's Linux computers, which can be found in MCRey 316 and 318. This network is managed independently of the college network, and your password that works for your e-mail, Campus Web, and the Windows and MacOS computers around campus will not work with the Linux computers.
If you don't already have a Linux account from a previous semester, please stop by Dr. Burch's office in MCRey 310. (If Dr. Burch is unavailable, you might ask Dr. Ferrer if he'd be willing to help.) If you do have an account but have forgotten your password — shame on you! But, again, you can stop by Dr. Burch's office for help with resetting your password.
After you have successfully logged into a Linux computer, you will want to start the Terminal program. Go to the Application's menu in the screen's upper left corner, then select the Accessories submenu, and then select the Terminal option.
After logging in, the first thing you will want to do is to fetch the file that you'll be working with throughout this assignment. To copy the file into your directory, issue the following command while at the command prompt: Enter the portion in green boldface and then press the Enter key.
me@computer:~$ cp /export/shared/courses ~
This copies the file named courses into your home directory. The courses file lists all CSCI and MATH courses taught at Hendrix from Fall 2004 to Spring 2011. Here is an example of the first three lines from the file:
2004 1S CSCI150 01 8:10am MTWF 15 MCRey315 D.Collins 2004 1S CSCI151 01 11:10am MTWF 5 MCRey317 C.Burch 2004 1S CSCI250 01 10:10am MWF 3 MCRey317 G.Ferrer
Each line of the file contains several pieces, separated by tab characters:
No space characters are included on any of the lines — the only whitespace in the file are the tab characters separating columns within each line and the newline character at the end of each line.
Your answers must be submitted as a text file.
A text file consists solely of ASCII characters (no formatting characters),
available to be read without any interpretation by any program.
Most word processors, by contrast, save files in ODT, DOC, DOCX, HTML,
or even PDF formats; none of these are text files.
To create a text file under the Linux system,
I recommend the gedit program, which you can start by going to
the screen's upper-left Applications menu, then to its
Accessories submenu, and then to gedit Text Editor.
For a text editor under Windows, I can recommend Notepad++.
Save into a text file named commands.txt, You should submit this file using the Sauron Submission System.
This assignment consists of a set of problems
for which
you are to write one-line commands that solve the problem concisely.
Note: Your answers should rely only on the information
provided in the document
Introducing the
Linux command line.
For each problem, I have provided the output that would result from executing the correct command using the provided courses file. Of course, your solution should represent a command that actually computes the answer as specified in the problem.
List all lines corresponding to sections taught in rooms that were not in the Morgan Center (that is, not in MCRey or MCAcx).
2005 1S MATH120 01 9:10am MWF 21 MillsC D.Collins 2008 1S MATH120 01 9:10am MWF 12 Fause10 Z.Barel 2008 2S MATH120 02 11:10am MWF 17 Mills304 J.Nail
List all lines corresponding to sections taught in MCRey115 that were not sections of MATH 140.
2006 2S MATH130 02 12:10pm MTWF 15 MCRey115 Z.Barel 2007 2S MATH130 02 12:10pm MTWF 20 MCRey115 Z.Barel 2008 1S MATH120 02 12:10pm MWF 40 MCRey115 J.Nail
List the instructors who have taught CSCI 420 over the years.
2005 D.Hoffman 2007 D.Collins 2009 D.Leonard
List the year, semester, and instructor for the seven earliest sections of CSCI 135.
2004 2S G.Ferrer 2005 1S G.Ferrer 2006 2S M.Clark 2006 2S G.Ferrer 2007 1S G.Ferrer 2007 2S A.Wright 2007 2S G.Ferrer
Show the lines corresponding to the five sections with the highest enrollments.
2006 2S MATH120 01 12:10pm MWF 46 MCAcx119 D.Collins 2009 2S MATH130 02 12:10pm MTWF 42 MCRey110 L.Seme 2008 1S MATH130 02 11:10am MTWF 40 MCRey110 D.Sutherland 2008 1S MATH120 02 12:10pm MWF 40 MCRey115 J.Nail 2007 2S MATH120 01 10:10am MWF 40 MCRey110 J.Nail
List the number of sections of MATH 130 taught in each year.
4 2004
4 2005
5 2006
5 2007
5 2008
5 2009
6 2010
List the total number of sections of CSCI 150 taught by each instructor over the years.
7 C.Burch
3 D.Collins
4 G.Ferrer
List the number of sections taught by each instructor in 2009–10.
6 B.Wood
5 C.Burch
6 D.Campbell
1 D.Collins
3 D.Leonard
2 D.Sutherland
5 G.Ferrer
6 L.Seme
6 Z.Barel
Extra credit: List the number of distinct courses taught by
each instructor over the years listed. By distinct courses,
I mean that somebody may have taught several sections of CSCI 150
(for example), but all these sections together count as just
one distinct course. But if the person teaches CSCI 230 just once,
that also counts as having taught a separate course.
1 A.Wright
1 A.Zimmerman
10 B.Cha
11 B.Wood
11 C.Burch
5 C.Camfield
11 D.Campbell
12 D.Collins
4 D.Hoffman
4 D.Leonard
4 D.Sutherland
9 G.Ferrer
1 J.Nail
4 L.Seme
1 M.Clark
1 N.French
12 Z.Barel