The Sun Rays are computer workstations that you can use to access the machine called Strauss. Strauss is where you will do your actual programming in this course. In lab, you'll access Strauss via the Sun Rays. The SunRays are a specific brand name for a type of system called an "X Terminal".
Note: Outside of lab, you may access Strauss from any computer connected to the Internet, provided you have the right access software (e.g., a secure shell client program.) Your instructor will say more about that in lecture. Some work for this course you can do from any computer, provided you can use that computer to access Strauss. Other work you might have to do directly on the Sun Rays. There are Sun Rays in Willard Hall 009, and also in some other locations on campus, including the basement of Smith Hall.
If you can do all those things and your lab is complete, you are all set for this week, and you can start on reading Chapters 1 through 2.4 in your Hanly & Koffman text.
In your Andersen textbook (Just Enough Unix, 5th Edition), Chapters 1,2,3,15,32,33. These are short chapters, but you are not expected to know all this material off the top of your head; instead, find what you need to know to accomplish the task at hand.
Info on logging in and out and accessing the web on the Sun Rays is at the following link:
http://copland.udel.edu/~pconrad/UnixAtUD/SunRay.html
That link also has information on what to do if you don't yet have a UDelNet Id. Finally, there is also information on that page that will help you pull up an "XTerm on Strauss"; you'll need that when you get to Goals 5 and 6.
In addition, you should do the following steps:
Click "log on". This should take you to a login screen, and then to a menu showing the MyCourses page for this course. Find the assignment Lab00 and review it (it is a very short version of this document, and makes a good checklist).
You now have found two important links for your success in 105, the class webpage and MyCourses.
Open an XTerm on strauss (If you don't know how and/or are not sure
what "Xterm on Strauss" means, follow this link to the Sun Ray
documentation: http://copland.udel.edu/~pconrad/UnixAtUD/SunRay.html).
Now it's time to start learning emacs. Emacs is a "text editor",
that is, a program that helps you create files on strauss. Go to an
xterm on strauss, and type "emacs &". If you get a command not
found message, you may have to type "/opt/bin/emacs &" until you correct
your path variable.
When you see Emacs, the paragraph of text will tell you how to start running a self-directed tutorial. Do this. The option to run the tutorial appears every time you open emacs. You can run the tutorial as many times as you like until all the material is familiar or you become bored out of your gourd.
Once you are comfortable with using emacs, go ahead and use emacs to create a text file called "lab00.dat" containing the following, each on a separate line: your name, your hometown, your favorite US state other than the one in which your hometown is located, and your unix userid.) For example:
Your Namehere Wilmington, DE Arizona ynamehe |
When you are finished, send the file to the printer in Willard 009 with the following Unix command typed into an xterm:
qpr -q whlps lab00.dat
Also, upload this file as part of your submission for Lab00 in MyCourses. But DON'T SUBMIT YET! That is, don't press the "submit" button. Just upload for now. You'll hit submit at the end of lab, after you've also uploaded your C program and script file. You will wait until all of your files are uploaded before clicking submit once.
If you aren't sure how to do this, check the following link for help, or ask your TA:
http://www.udel.edu/MyCourses/students/assignments.html
(If you accidently hit submit before you get your C program uploaded, don't freak out; your TA can reset the assignment so that you can try it again. Your TA might not be able to fix it immediately, because its the first week of the semester and her TA account might not be active yet. But if not, she can fix it up for you by next lab, and you can make it up then without penalty.)
// lab00.c Jane Doe doej@udel.edu 3/1/06 int main(void) |
which cc
and
which gcc
The "which" command will either return a path (characters separated by slashes) or "command not found". If neither is found, consult your TA for how to set up your .localenv file so that you can use a compiler.
Use the following command typed into an xterm to compile it (compile means: translate from C into machine language, or if it cannot be translated because of errors, report the errors) with one of the following commands. At this point in the semester, you may use either one (later on, I may tell you to use one or the other.)
cc lab00.c
OR
gcc lab00.c
The first command (cc) is a commercial compiler, supplied by Sun Microsystems. The second command, gcc is an open source compiler, supplied by the GNU project, which is staffed by volunteer programmers. From time to time, we may discover differences, but for now, I don't care which one you use. Sometimes if you have a tricky syntax error it is useful to try both, because sometimes one gives you more useful error messages than the other.
./a.out
You might be able to get away with just typing a.out
without the leading ./
, or you might not; it all depends
on how your account is set up. (It has to do with the Unix concept of
the "path"; you'll read about that in the Andersen text later on.)
If all goes well, you should see something like the following:
> cc lab00.c |
Note that you must be careful when
using the script command. The script command will wipe out
your work if you are not careful! Script works by writing
into whatever filename you specify, so don't specify a filename that
has good stuff in it (like your program).
The thing to remember is: on the command line, type "script" followed by the name of a .txt file; for example:
script lab00.txt |
This is correct!!!! |
Never put "script" followed by the name of a .c file. It will wipe out your .c file where your code is!
Ok, now that we have that out of the way...
Type "script lab00.txt". Then go through the following steps at an xterm:
qpr -q whlps lab00.txt
qpr -q whlps lab00.c
And finally, you are done with Goal 6!
First, lets get this out of the way: Lab attendance is
mandatory.
Attendance will be recorded. Be sure you are on time so the TA does
not miss you.
Lab attendance is reported on MyCourses as, for example, lab00p (lab attendance for Lab0.) Grades are marked as P, A, E, or L for "Present", "Absent", "Excused", or "Late". Only the instructor can excuse you from attending lab.
Your lab has two components: paper submission and MyCourses submission. Paper is due at the start of Friday labs the following week (not two minutes after lab starts!). Hint: The printer at the lab is often overcrowded just before a lab starts, so print your lab somewhere else that morning or the night before.
The MyCourses part of your lab is due at 11:55 p.m. Thursday night of the following week So this lab is due, for all students, Feb 16th at 11:55 p.m. on MyCourses, and the following day for paper assignments.
Late penalties apply as noted on the class web page.