FAQ | Newsboard | Telnet | Email TA | Lectures | Assignments | Man pages | Help |
---|
For the fourth assignment we have (as usual) very simple assignment turnin instructions.
Step1:
You should have created a file named as4.cpp which contains
your code for assignment three. In the first step you make a script file
by running the following commands
% script as4.dat % cat as4.cpp % cat io.cpp % cat bsearch.cpp % make % bsearch 24 49 < Intinput ... ... % bsearch 100 675 < input3 ... ... % exit
The first command provides the name of the file in which all subsequent interaction that appears on the screen will be copied to. The next few commands print the source files on the screen. Next, we invoke the compiler to compile your code and create an executable named ``bsearch''. Run the executable. Run it as many times as needed to let the grader appreciate what your program does and what it doesn't do. Program testing is very important and counts towards your grade. exit leaves the script.
Access the man page on script to find out more about ``script.'' Make sure that the name of the script file (in this case as4.dat) is different from any other file name in the current directory. Use ls to list all files in your current directory.
Step2:
Copy the results to a DOS formatted diskette. We need you to copy the
source (as4.cpp) and script
(as4.dat) files using the following commands to do so.
% mcopy as4.cpp a: % mcopy io.cpp a: % mcopy bsearch.cpp a: ... ... % mcopy as4.dat a:Please make sure that you have inserted a DOS formatted diskette in drive before you run the mcopy commands. Read the man page on mcopy to find out about mcopy and other DOStoUNIX and UNIXtoDOS tools. The first command will copy source code to the diskette, while the second will copy the script file.
Step3:
Change to the directory that contains your assignment files. Then type
% lpr -Plp as4.cpp % lpr -Plp io.cpp % lpr -Plp bsearch.cpp ... ... % lpr -Plp as4.datto send the source and script files to the printer.