5 Pages

lab03

Course: CS 3308, Fall 2004
School: Colorado
Rating:
 
 
 
 
 

Word Count: 1485

Document Preview

#3 Lab Automating Installation & Introduction to Make Due in Lab, September 17, 2003 Name: Lab Time: Grade: Error Checking In this lab you will be writing a shell script to automate the installation of a system. The system that your shell script will install is the gnuchess system that you installed by hand in lab 1. Since commands are not being typed interactively by a user, a shell script needs to avoid...

Register Now

Unformatted Document Excerpt

Coursehero >> Colorado >> Colorado >> CS 3308

Course Hero has millions of student submitted documents similar to the one
below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.

Course Hero has millions of student submitted documents similar to the one below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.
#3 Lab Automating Installation & Introduction to Make Due in Lab, September 17, 2003 Name: Lab Time: Grade: Error Checking In this lab you will be writing a shell script to automate the installation of a system. The system that your shell script will install is the gnuchess system that you installed by hand in lab 1. Since commands are not being typed interactively by a user, a shell script needs to avoid making assumptions. Error messages generated during the execution of a shell script are likely to go unnoticed as the output scrolls quickly across the screen. The programmer of a shell script, therefore, should be aware of, and try to prevent, possible error conditions that might occur when the shell script executes. One possible source of errors is the directory structure. A shell script should avoid using non-existent directories. As such, it needs to check for the existence of any directory it intends to use, and be able to create missing directories as needed. Of course, there is a limit to how much checking a shell script can or should do. For example, shell scripts rarely need to check for the existence of a users home directory. The amount of error checking required is, therefore, a design decision that must be made by the scripts programmer. Before making this decision, the programmer should consider the scripts users. How likely are they to encounter a particular error, and will they be able to deal with it, if it is not handled by the shell script? In addition, a programmer may have external requirements imposed by a manager, or customer, specifying the type of errors that must be handled. Your shell script should not make assumptions about the existence of architecturespecic subdirectories (such as .../arch/x86/build/..., etc.) when building and installing the gnuchess program. If any required directory does not exist, your shell script needs to create it. This allows your shell script to proceed with condence in the automated installation. Automatically Setting up Your Architecture Specic Directories 1. To set up your architecture specic directories create a shell script called archdir-setup and put it in your ~/csci3308/bin directory (recall, this is your architecture-independent bin directory). /10 1 2. This shell script should be written so that it can be run from any directory. You should either use absolute paths, or change directory so that you know where you are before using relative paths. 3. In this shell script you can assume that the directory ~/csci3308/arch exists. Add the following commands to your shell script to create the architecture specic subdirectories: cd ~/csci3308/arch/$ARCH mkdir bin build include lib man tmp 4. Make this script executable. Then type rehash. This will reset the hashtable the shell uses to optimize nding commands. Now use which or where to make sure that archdir-setup is in your path. 5. Now execute the script on an x86 machine. You should see a few error messages (up to six) as the script tries to create directories that already exist. If you do not see any error messages, then run the script again (and also check that your $ARCH variable is dened). These error messages are not very serious, given our purpose for this script. We are merely double checking that these directories exist. If they already exist thats ne, but the user should not have to see this type of error message. 6. To avoid these error messages, rewrite your script so that it rst checks if a directory exists, and only calls mkdir if the directory doesnt exist. To do this you will need to use the if statement, and le inquiry operators. You can learn more about le inquiry operators on page 639 of the Linux Shells by Example textbook. 7. Log in to a machine of a dierent architecture (using the rlogin command) and check to see if your script runs correctly. The machines in the Whitewater lab are Linux machines with an architecture of x86. In 1B54 there are Sun Ultras that have an architecture of sun4, so you should be able to remotely access one of these machines and run your script there. The names of the Sun Ultra machines are: bfs, csel2, ahau, cauac, etznab, cib, men, ix, ben, eb, muluc, caban, oc, manik, lamat, cimi, chicchan, ik, akbal, chuen, kan, imix When you run your script, it may fail with an error message like this: .../csci3308/arch/sun4: No such file or directory Since have we been using x86 machines for the entire semester, we have yet to create an architecture-specic subdirectory for the sun4 architecture. Our script should be able to set up our architecture-specic directories on whatever machine you are currently on. Therefore, modify the archdir-setup script to create the architecture-specic subdirectory, if needed. 2 8. Run your script again on this new machine to make sure that it works correctly. (e.g. it should create the .../csci3308/arch/sun4 directory and then create the bin, build, and other directories beneath it). Run the script a second time to make sure it doesnt produce error messages when the directories already exist. 9. Print out your archdir-setup script and turn it in with the lab. Be sure to logout of the sun4 machine (using the exit command) and perform the rest of this lab on a machine in the Whitewater lab. Writing the Installation Shell Script 10. You will now write the shell script that installs gnuchess automatically. This script should be called gnuchess-install, and it should be in your architecture independent bin directory. In order to work, your shell script will require that the gnuchess distribution has already been downloaded and unpacked into your src directory. 11. The rst thing your shell script should do is to run your archdir-setup script to be sure that all of the directories it needs exist. 12. Before building gnuchess your shell script needs to make a new subdirectory of the architecture-specic build directory. Add the command(s) to your shell script to create this directory, but be sure not to print an error message if this directory already exists. 13. The following steps need to be taken to install gnuchess. For each step add the necessary command(s) to your gnuchess-install shell script. Look back at lab 1 to help you remember the exact commands. (a) Localizing (congure) (b) Building (make) (c) Installing (make install) 14. Now nish up your shell script by making it executable, and making sure of the following things. The shell script should be in your path, and it should work regardless of what directory you are in when you run the script. I.e. you cannot assume that you start in the build directory. 15. Test your script starting with a clean environment. Change to the directory ~/csci3308/arch/$ARCH and remove all of its subdirectories. Run your gnuchess-install program and check to see that it automatically creates the needed directories, builds gnuchess, and installs it in the correct directory. 16. Print out your gnuchess-install script and turn it in with the lab. 3 Introduction to Make 17. Typ...

Find millions of documents on Course Hero - Study Guides, Lecture Notes, Reference Materials, Practice Exams and more. Course Hero has millions of course specific materials providing students with the best way to expand their education.

Below is a small sample set of documents:

Colorado - CS - 3308
Lab #7 Testing Due In Lab, October 22, 2003 Name: Lab Time: Grade: Testing Today you will be testing a program to expose failures. In Homework 7, you familiarized yourself with the operation of a quick sort program, quick-okay. Now that you know the
Colorado - CS - 3308
Lab #10 XML and XSLT Due in Lab, December 3, 2003 Name: Lab Time: Grade: /10In this lab, you will gain experience working with XML and XSLT. XML is a language for creating markup languages. A markup language is any language that includes both text
Colorado - CS - 3308
Notes on Using gdb, the GNU Debugger Benjamin Zorn (with small modications by Kenneth M. Anderson for CSCI 3308)A symbolic debugger can make writing and debugging programs much easier. The GNU debugger can be used to debug programs compiled with the
Colorado - CS - 3308
Software Testing Notebook Worksheet #1 Functional Testing Due: October 31, 2003 Name: Lab Time: Grade: /75On my honor, as a University of Colorado at Boulder student, I have neither given nor received unauthorized assistance on this work. Signature
Colorado - CS - 3308
Software Testing Notebook Worksheet #2 Structural Testing Due: Friday, November 7, 2003 Name: Lab Time: Grade: /50On my honor, as a University of Colorado at Boulder student, I have neither given nor received unauthorized assistance on this work. S
Colorado - CS - 3308
Software Testing Notebook Worksheet #3 Automating Testing & Fixing Bugs Due: November 14, 2003 Name: Lab Time: Grade: /75On my honor, as a University of Colorado at Boulder student, I have neither given nor received unauthorized assistance on this
Colorado - CS - 5828
Todays LectureThe Mythical Man-MonthKenneth M. Anderson Foundations of Software Engineering CSCI 5828 - Spring Semester, 2001 (Guest Lecture) Discuss first four chapters of The Mythical Man-Month The Tar Pit The Mythical Man-Month The Surgica
Colorado - CS - 5828
Todays Lecture Discuss Software Life CyclesSoftware Life CyclesKenneth M. Anderson Foundations of Software Engineering CSCI 5828 - Spring Semester, 2001 (Guest Lecture) Why do we need them? What types exist? Code and Fix (hacking) Waterfa
Colorado - CS - 5828
Todays Lecture The Cathedral and the BazaarKenneth M. Anderson Foundations of Software Engineering CSCI 5828 - Spring Semester, 2001 Guest Lecture Discuss Background of the Paper Discuss Raymonds Rules Open Discussion on the Open-Source Approach
Colorado - CS - 5828
Todays Lecture Extreme ProgrammingKenneth M. Anderson Foundations of Software Engineering CSCI 5828 - Spring Semester, 2001 Guest Lecture Discuss aspects of the Extreme Programming Model As presented in Extreme Programming Explained: Embrace Chan
Colorado - CS - 3308
Lab #2 Find and Grep Due in Lab, September 8, 2004 Name: Lab Time: Grade: Find The nd command is used to locate les in a le system. The nd command starts at a single directory and descends recursively into all of its subdirectories to locate les. The
Colorado - CS - 3308
Lab #3 Automating Installation & Introduction to Make Due in Lab, September 15, 2004Name: Lab Time: Grade: Error Checking In this lab you will be writing a shell script to automate the installation of a system. The system that your shell script wil
Colorado - CS - 3308
Todays Lecture Lecture 2: No Silver BulletKenneth M. Anderson Software Methods and Tools CSCI 3308 - Fall Semester, 2004August 27, 2004 University of Colorado, 2004 2Discuss No Silver Bullet paper Brooks reflections on it after nine years
Colorado - CS - 3308
Todays Lecture Lecture 6: Build ManagementKenneth M. Anderson Software Methods and Tools CSCI 3308 - Fall Semester, 2004September 10, 2004 University of Colorado, 2004 2Discuss Build Management Introduce makeBuild ManagementDuring the impleme
Colorado - CS - 3308
Todays Lecture Lecture 7: Make MacrosKenneth M. Anderson Software Methods and Tools CSCI 3308 - Fall Semester, 2004Brief review of make Explore make macros in more detailNote: when you see macro think variableBrooks Corner: The Mythical Man-Mont
Colorado - CULTER - 06
CU Mountain006 Research StationWinter 2 Ecology
Colorado - ASTR - 5770
New InflationAmy Bender 05/03/2006Inflation Basics Perturbations from quantum fluctuations of scalar field Fluctuations are: Gaussian Scale Invariant Spectrum (almost) k3P(k) ~ constant Adiabatic Scalar & Tensor Matter/radiation anisotrop
Colorado - ASTR - 5770
HST Key Project on the Extragalactic Distance ScalePresentation by Alaine Ginocchio May 5, 2006HST Key ProjectMeasuring an accurate value of H0 was one of the motivating reasons for building NASA/ESA Hubble Space Telescope (HST).Measurement
Colorado - ASTR - 5770
Holographic Dark EnergyPreety Sidhu 5 May 2006Black Holes and Entropy Black holes are maximal entropy objects Entropy of a black hole proportional to surface area of event horizon Max entropy for volume of space goes as bounding surface area, n
Colorado - ASTR - 5770
The Sunyaev-Zeldovich EffectJason Glenn APSHistorical Perspective Physics of the SZ Effect -Previous Observations & Results Bolocam Imminent Experiments Future Work ReferencesCMB discovered in 1964 by Penzias and Wilson COBE 1989: perfect blackbo
Wisconsin - CS - 0601
Proximal Plane ClassificationKDD 2001 San Francisco August 26-29, 2001Glenn Fung & Olvi MangasarianData Mining InstituteUniversity of Wisconsin - Madison Second Annual Review June 1, 2001Key ContributionsFast new support vector machine class
Wisconsin - REV - 0601
Proximal Plane ClassificationKDD 2001 San Francisco August 26-29, 2001Glenn Fung & Olvi MangasarianData Mining InstituteUniversity of Wisconsin - Madison Second Annual Review June 1, 2001Key ContributionsFast new support vector machine class
St. Johns River Community College - CS - 0601
Proximal Plane ClassificationKDD 2001 San Francisco August 26-29, 2001Glenn Fung & Olvi MangasarianData Mining InstituteUniversity of Wisconsin - Madison Second Annual Review June 1, 2001Key ContributionsFast new support vector machine class
Wisconsin - CS - 0600
Concave Minimization for Support Vector Machine ClassifiersUnlabeled Data Classification & Data SelectionGlenn Fung O. L. MangasarianPart 1: Unlabeled Data Classifications ssssGiven a large unlabeled dataset Use a k-Median clustering al
Wisconsin - REV - 0600
Concave Minimization for Support Vector Machine ClassifiersUnlabeled Data Classification & Data SelectionGlenn Fung O. L. MangasarianPart 1: Unlabeled Data Classifications ssssGiven a large unlabeled dataset Use a k-Median clustering al
St. Johns River Community College - CS - 0600
Concave Minimization for Support Vector Machine ClassifiersUnlabeled Data Classification & Data SelectionGlenn Fung O. L. MangasarianPart 1: Unlabeled Data Classifications ssssGiven a large unlabeled dataset Use a k-Median clustering al
Wisconsin - ECE - 756
Linear Programming and CPLEXTing-Yuan Wang Advisor: Charlie C. ChenDepartment of Electrical and Computer Engineering University of Wisconsin-MadisonFeb. 22 2000CPLEX Optimization Options: Primal, Dual Simplex Methods Network Flow Problems MI
St. Johns River Community College - ECE - 756
Linear Programming and CPLEXTing-Yuan Wang Advisor: Charlie C. ChenDepartment of Electrical and Computer Engineering University of Wisconsin-MadisonFeb. 22 2000CPLEX Optimization Options: Primal, Dual Simplex Methods Network Flow Problems MI
Wisconsin - ECE - 03
Artifact and Textured region Detection- Vishal BangardOutline Need for artifact and textured region detection Aim of the project Techniques used in the imaging world Approaches used Results ConclusionWhy do artifact detection ? A lot of
Wisconsin - ECE - 738
Artifact and Textured region Detection- Vishal BangardOutline Need for artifact and textured region detection Aim of the project Techniques used in the imaging world Approaches used Results ConclusionWhy do artifact detection ? A lot of
St. Johns River Community College - ECE - 03
Artifact and Textured region Detection- Vishal BangardOutline Need for artifact and textured region detection Aim of the project Techniques used in the imaging world Approaches used Results ConclusionWhy do artifact detection ? A lot of
St. Johns River Community College - ECE - 738
Artifact and Textured region Detection- Vishal BangardOutline Need for artifact and textured region detection Aim of the project Techniques used in the imaging world Approaches used Results ConclusionWhy do artifact detection ? A lot of
Wisconsin - ECE - 03
Unequal Error Protection for Video Transmission over Wireless ChannelsECE738 Project PresentationChang, Hong Hong 05/09/20031OutlineUnequal Error Protection/ Unequal Loss Protection Problem Formulation Channel Model RS code Theoretical Res
Wisconsin - ECE - 738
Unequal Error Protection for Video Transmission over Wireless ChannelsECE738 Project PresentationChang, Hong Hong 05/09/20031OutlineUnequal Error Protection/ Unequal Loss Protection Problem Formulation Channel Model RS code Theoretical Res
St. Johns River Community College - ECE - 03
Unequal Error Protection for Video Transmission over Wireless ChannelsECE738 Project PresentationChang, Hong Hong 05/09/20031OutlineUnequal Error Protection/ Unequal Loss Protection Problem Formulation Channel Model RS code Theoretical Res
St. Johns River Community College - ECE - 738
Unequal Error Protection for Video Transmission over Wireless ChannelsECE738 Project PresentationChang, Hong Hong 05/09/20031OutlineUnequal Error Protection/ Unequal Loss Protection Problem Formulation Channel Model RS code Theoretical Res
Wisconsin - ECE - 03
Portraiture MorphingPresented by Fung, Chau-ha JeniceOutline Problem Statement Prior Art: Portraiture Morphing Approaches Results Conclusion Future WorksProblem Statement Image morphing = Image metamorhposis Creating a smooth transfor
Wisconsin - ECE - 738
Portraiture MorphingPresented by Fung, Chau-ha JeniceOutline Problem Statement Prior Art: Portraiture Morphing Approaches Results Conclusion Future WorksProblem Statement Image morphing = Image metamorhposis Creating a smooth transfor
St. Johns River Community College - ECE - 03
Portraiture MorphingPresented by Fung, Chau-ha JeniceOutline Problem Statement Prior Art: Portraiture Morphing Approaches Results Conclusion Future WorksProblem Statement Image morphing = Image metamorhposis Creating a smooth transfor
St. Johns River Community College - ECE - 738
Portraiture MorphingPresented by Fung, Chau-ha JeniceOutline Problem Statement Prior Art: Portraiture Morphing Approaches Results Conclusion Future WorksProblem Statement Image morphing = Image metamorhposis Creating a smooth transfor
Wisconsin - ECE - 03
ECE 738 ProjectBrain segmentation and Phase unwrapping in MRI dataJongHoon LeeOutline Nature of fast MRI: EPI & Field Inhomogeneity Background problem Image Distortion Specific problems a) Brain Segmentation b) Phase Unwrapping Goal Appro
Wisconsin - ECE - 738
ECE 738 ProjectBrain segmentation and Phase unwrapping in MRI dataJongHoon LeeOutline Nature of fast MRI: EPI & Field Inhomogeneity Background problem Image Distortion Specific problems a) Brain Segmentation b) Phase Unwrapping Goal Appro
St. Johns River Community College - ECE - 03
ECE 738 ProjectBrain segmentation and Phase unwrapping in MRI dataJongHoon LeeOutline Nature of fast MRI: EPI & Field Inhomogeneity Background problem Image Distortion Specific problems a) Brain Segmentation b) Phase Unwrapping Goal Appro
St. Johns River Community College - ECE - 738
ECE 738 ProjectBrain segmentation and Phase unwrapping in MRI dataJongHoon LeeOutline Nature of fast MRI: EPI & Field Inhomogeneity Background problem Image Distortion Specific problems a) Brain Segmentation b) Phase Unwrapping Goal Appro
Wisconsin - ECE - 03
ECE738 Presentation of Project SurveyA survey of image-based biometric identification methods: Face, finger print, iris, and othersPresented by: David LinOutline Problems and motivations Different identification methods Face Recognition Fing
Wisconsin - ECE - 738
ECE738 Presentation of Project SurveyA survey of image-based biometric identification methods: Face, finger print, iris, and othersPresented by: David LinOutline Problems and motivations Different identification methods Face Recognition Fing
St. Johns River Community College - ECE - 03
ECE738 Presentation of Project SurveyA survey of image-based biometric identification methods: Face, finger print, iris, and othersPresented by: David LinOutline Problems and motivations Different identification methods Face Recognition Fing
St. Johns River Community College - ECE - 738
ECE738 Presentation of Project SurveyA survey of image-based biometric identification methods: Face, finger print, iris, and othersPresented by: David LinOutline Problems and motivations Different identification methods Face Recognition Fing
Wisconsin - ECE - 03
A survey of Face Recognition TechnologyWei-Yang Lin May 07, 2003Road Map Introduction Challenge in Face Recognition variation in pose Variation in illumination Some recently works in FRT DiscussionIntroduction FRT is a research area span
Wisconsin - ECE - 738
A survey of Face Recognition TechnologyWei-Yang Lin May 07, 2003Road Map Introduction Challenge in Face Recognition variation in pose Variation in illumination Some recently works in FRT DiscussionIntroduction FRT is a research area span
St. Johns River Community College - ECE - 03
A survey of Face Recognition TechnologyWei-Yang Lin May 07, 2003Road Map Introduction Challenge in Face Recognition variation in pose Variation in illumination Some recently works in FRT DiscussionIntroduction FRT is a research area span
St. Johns River Community College - ECE - 738
A survey of Face Recognition TechnologyWei-Yang Lin May 07, 2003Road Map Introduction Challenge in Face Recognition variation in pose Variation in illumination Some recently works in FRT DiscussionIntroduction FRT is a research area span
Wisconsin - ECE - 03
Medical Image Registration: A SurveyAiming LuOutline Introduction Transformation Algorithms Visualization Validation ConclusionIntroduction Image registration matching two images so that corresponding coordinate points in the two images
Wisconsin - ECE - 738
Medical Image Registration: A SurveyAiming LuOutline Introduction Transformation Algorithms Visualization Validation ConclusionIntroduction Image registration matching two images so that corresponding coordinate points in the two images
St. Johns River Community College - ECE - 03
Medical Image Registration: A SurveyAiming LuOutline Introduction Transformation Algorithms Visualization Validation ConclusionIntroduction Image registration matching two images so that corresponding coordinate points in the two images
St. Johns River Community College - ECE - 738
Medical Image Registration: A SurveyAiming LuOutline Introduction Transformation Algorithms Visualization Validation ConclusionIntroduction Image registration matching two images so that corresponding coordinate points in the two images
Wisconsin - ECE - 03
Detecting Artifacts and Textures in Wavelet Coded ImagesRajas A. Sambhare ECE 738, Spring 2003 Final ProjectJanuary 12, 2009Motivation Wavelet based image coders like JPEG 2000 lead to new types of artifacts when used at small bit-rates Bloc
Wisconsin - ECE - 738
Detecting Artifacts and Textures in Wavelet Coded ImagesRajas A. Sambhare ECE 738, Spring 2003 Final ProjectJanuary 12, 2009Motivation Wavelet based image coders like JPEG 2000 lead to new types of artifacts when used at small bit-rates Bloc
St. Johns River Community College - ECE - 03
Detecting Artifacts and Textures in Wavelet Coded ImagesRajas A. Sambhare ECE 738, Spring 2003 Final ProjectJanuary 12, 2009Motivation Wavelet based image coders like JPEG 2000 lead to new types of artifacts when used at small bit-rates Bloc
St. Johns River Community College - ECE - 738
Detecting Artifacts and Textures in Wavelet Coded ImagesRajas A. Sambhare ECE 738, Spring 2003 Final ProjectJanuary 12, 2009Motivation Wavelet based image coders like JPEG 2000 lead to new types of artifacts when used at small bit-rates Bloc
Wisconsin - ECE - 03
MPEG2 FGS ImplementationECE 738 Advanced Digital Image ProcessingAuthor: Deshan Yang05/01/2003Introduction of FGSFGS = fine granularity scalability For MPEG2 / MPEG4 and others Comparing to SNR, temporal, spatial scalability, FGS enhances vi