5 Pages

lab03

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

Word Count: 1368

Document Preview

#3 Lab Automating Installation & Introduction to Make Due in Lab, September 15, 2004 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 15, 2004 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 congure 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: #!/bin/tcsh -f 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 run the script. 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 check that your $ARCH variable is dened and then run the script again. 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. However, 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. We are now going to simulate running this script on a dierent architecture. Redene your $ARCH environment variable (on some accounts, this variable is $arch) to have the value sun4: setenv ARCH sun4 or setenv arch sun4 8. Before running the script, verify that you do not have a sun4 directory in your ~/csci3308/arch directory. If you do, remove it with the command: yes | rm -r 9. ~/csci3308/arch/sun4 Now, run the archdir-setup script again. What happens? 10. While we can assume that the ~/csci3308/arch directory exists, we can not assume that a particular architecture-specic subdirectory exists. Modify your script to create the architecture-specic subdirectory, if needed. 2 11. Run your script again to make sure that it works correctly. (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. 12. Now, change your $ARCH variable back to its correct value: setenv ARCH x86 or setenv arch x86 13. Print out your archdir-setup script and turn it in with your lab. Writing the Installation Shell Script 14. You will now write a shell script that installs gnuchess automatically. This script will 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. 15. The rst thing your shell script should do is run your archdir-setup script. This ensures that all of the directories that it needs exist. 16. 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 make sure that your script will not print an error message if this directory already exists. 17. 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) 18. 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. 19. 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. 20. Print out your gn...

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
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
Wisconsin - ECE - 738
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
St. Johns River Community College - 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
St. Johns River Community College - ECE - 738
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
Wisconsin - ECE - 539
Using Clustering to Make Prediction Intervals For Neural NetworksClaus Benjaminsen ECE539 - final project fall 2005What is a prediction interval? Aninterval within which the true target value is predicted to be Prediction intervals are often
St. Johns River Community College - ECE - 539
Using Clustering to Make Prediction Intervals For Neural NetworksClaus Benjaminsen ECE539 - final project fall 2005What is a prediction interval? Aninterval within which the true target value is predicted to be Prediction intervals are often
Wisconsin - ECE - 539
Music ClassificationUsing Neural Networks Craig Dennis ECE 539Problem and Motivation Peoplehave hundreds of MP3s and other digital music files unclassified on their computer iTunes and other large digital music stores must classify thousands o
St. Johns River Community College - ECE - 539
Music ClassificationUsing Neural Networks Craig Dennis ECE 539Problem and Motivation Peoplehave hundreds of MP3s and other digital music files unclassified on their computer iTunes and other large digital music stores must classify thousands o
Wisconsin - ECE - 539
Determining College Football RankingsWith ClusteringWhere do we start? Look for statistics on the web This keeps data up to date smoother updates. Determine good statistic set Dont want too many so that data is redundant Dont want too few
St. Johns River Community College - ECE - 539
Determining College Football RankingsWith ClusteringWhere do we start? Look for statistics on the web This keeps data up to date smoother updates. Determine good statistic set Dont want too many so that data is redundant Dont want too few
Wisconsin - ECE - 539
Predicting the Winner of an NFL Football GameMatt Gray CS/ECE 539Reasons to Predict NFL Football is watched by millions of people every weekend during the season. Vast amounts of money invested in NFL Football Prediction Polls such as Weekly Fo
St. Johns River Community College - ECE - 539
Predicting the Winner of an NFL Football GameMatt Gray CS/ECE 539Reasons to Predict NFL Football is watched by millions of people every weekend during the season. Vast amounts of money invested in NFL Football Prediction Polls such as Weekly Fo
Wisconsin - ECE - 539
Who Cares About the Arts?Predicting Formal Arts Participation from Survey DataAngela Han ECE 539 December 2005Project Objective Applypattern classifier neural network to arts marketing survey data Use neural network as a predictive model to i