Download presentation
Presentation is loading. Please wait.
Published byTobias Stafford Modified over 9 years ago
2
Week One Agenda IntroductionIntroduction Administrative AnnouncementsAdministrative Announcements Link of the WeekLink of the Week Expected OutcomesExpected Outcomes This Week’s TopicsThis Week’s Topics Next Week’s Lab AssignmentNext Week’s Lab Assignment Break Out ProblemsBreak Out Problems Upcoming DeadlinesUpcoming Deadlines Lab assistance, questions, and chat timeLab assistance, questions, and chat time
3
Introduction Instructor: Professor Bob D’Andrea Software Engineer Instructor at Franklin University for five years Phone No. 614.898.0457 Cell No. 616.519.5853 dandrear@franklin.edu Program Chair of Information and Technology: Mr. Todd Whittaker Phone # 614.947.6110 whittakt@franklin.edu
4
Administrative Announcements Instructor commitment Respond daily to student emails. Post exam and lab assignment grades as quickly as possible in student grade books. Post student midterm and final exam status on the Announcement page after each exam has been received from the Student Learning Center (SLC). cs.franklin.edu server Everyone will need a login to the cs.franklin.edu machine? Putty is the prescribed open source interface for this class. You will use putty to access the cs.franklin.edu machine. Student lab assignments will be tested under their itec400/homework directory on the cs.franklin.edu machine.
5
Administrative Announcements Recorded Franklin Live Power Point Presentations http://cs.franklin.edu/~dandrear/itec400/Winter_2012_UNIX_FL_Presentations Franklin Live file name format: Example: Week_One_1_UNIX.pptx Week_One_1_UNIX_ppt.ppt Week_One_1_UNIX_ppt.ppt Power Point files will be available on Monday morning for printing prior to class.
6
Administrative Announcements Email format for completed lab assignments Email a notification when an assignment is completed and ready to be graded. The “Subject” line of your email notification should have the following format: Example: dandrear V1WW Lab Assign. 1-3 Email format for questions Example: dandrear V1WW Question Example: dandrear V1WW Question Scripts and text file suffix All scripts and text files shall end with a suffix (e.g.,sh,.pl,.txt and.cgi). Homework assistance: Do not solicit help from the Internet for lab assignments. If caught soliciting assistance from the Internet, Franklin University will take action against you.
7
Administrative Announcements Bulletin Board: Midterm Exam Outline (not present) Final Exam Outline (not present) Public Domain/Open Source Software Evaluation folder (present). Student name: Open source topic: Drop Box: Deposit all lab assignments in the Drop Box. The Drop Box is located under your Franklin University course Web page “Communications” tab. Student drop box documentation link below http://online.franklin.edu/forms/StudentDropBoxManual.doc
8
Administrative Announcements Turnitin.com Assignments The Light Directory Access Protocol (LDAP) and Public Domain/Open Source lab assignments must be submitted to Turnitin.com. Your report will be verified by Turnitin.com for author originality. If Turnitin.com indicates that your percentage of originality is 45 percent or greater, I will not grade the paper. I will recommend that you seek assistance from the Student Learning Center (SLC).
9
Administrative Announcements UNIX System Administration Syllabus Optional Materials Tutorials: Refer to the following web sites throughout UNIX System Administration. They are excellent resources for UNIX and Linux: UNIX System Administration Independent Learning (USAIL) (NO LONGER AVAILABLE) http://web.archive.org/web/20080206003854/http://www.uwsg.indiana.edu/usai l/ Linux help, tutorials and tips UNIX Tutorial for Beginners UNIX help for Users.
10
Administrative Announcements APA style format: Your writing assignments will be graded on citing sources, spelling, punctuation, and capitalization. All reports must have a cover and reference page. Link of the week: New links are provided weekly to direct students to information on the Internet that will aid them with class lab assignments and enhance their overall learning experience. Tutoring and workshops: Student Learning Center (SLC) Writing appointments via Franklin Live
11
Administrative Announcements VMware software: Download or use the provided Live CD or DVD Knoppix Release 5.1.1 software on your laptop or server. Creating scripts using Knoppix software: ftp from your Knoppix software to cs.franklin.edu sftp://dandrear@cs.franklin.edu/export/home/dandre ar
12
Administrative Announcements Office hours Monday through Friday: 9:00 AM – 9:00 PM Saturday and Sunday: 12:00 AM – 6:00 PM A personalized Franklin Live session can be set up if additional assistance is needed. Discuss issue(s) on the phone 614.898.0457 (home) 614.519.5853 (cell)
13
Link of the Week Open Source Software: http://en.wikipedia.org/wiki/Open_sourcehttp://en.wikipedia.org/wiki/Open_sourcehttp://en.wikipedia.org/wiki/Open_source http://freshmeat.nethttp://freshmeat.nethttp://freshmeat.net http://sourceforge.nethttp://sourceforge.nethttp://sourceforge.net
14
Link of the Week Open Source Software: Definition of Open Source Software. Available in source code format Available in source code format Developed in a public, collaborative manner Developed in a public, collaborative manner Software is free of charge Software is free of charge Allows anyone to create modifications of the software, port it to new operating systems and processor architectures Allows anyone to create modifications of the software, port it to new operating systems and processor architectures Who benefits from open source products?
15
Expected Outcomes Upon successful completion of this course, students will be able to: Create non-trivial shell scripts.Create non-trivial shell scripts. Perform appropriate UNIX System Administration tasks.Perform appropriate UNIX System Administration tasks. Compose non-trivial scripts using Perl programming language.Compose non-trivial scripts using Perl programming language. Distinguish the roles of Linux and Open Source software.Distinguish the roles of Linux and Open Source software. Incorporate the make utility appropriately within programs.Incorporate the make utility appropriately within programs. Create a CGI scriptCreate a CGI script
16
Review Shell syntax What is a shell script? A shell script is a script written for the shell, or command line interpreter, of an operating system. It is often considered a simple domain-specific programming language. Typical operations performed by shell scripts include file manipulation, program execution, and printing text.
17
Review Shell syntax $# - Number of positional parameters$# - Number of positional parameters $! - Background PID$! - Background PID $? - Return value$? - Return value $$ - Process PID$$ - Process PID $ - Provides the content of a variable ($NUMBER)$ - Provides the content of a variable ($NUMBER) $0, $1, $2, $3 … - The syntax represents the positional parameters on the command line.$0, $1, $2, $3 … - The syntax represents the positional parameters on the command line../printnum.sh 4 exit 0 – The return values is a number from 0 to 255. A value of zero (0) indicates a normal exit.exit 0 – The return values is a number from 0 to 255. A value of zero (0) indicates a normal exit. exit 1 - Indicates a failure occurred.exit 1 - Indicates a failure occurred.
18
Review shell syntax “ “ - Double quotes. Removes special meaning of all enclosed characters, except $, `, “, and \.“ “ - Double quotes. Removes special meaning of all enclosed characters, except $, `, “, and \. Example: print “The price is $Price.\n”; (interpolation)Example: print “The price is $Price.\n”; (interpolation) ‘ ’ - Literal quotes. Removes the special meaning of all enclosed characters. A single quote cannot appear within single quotes because a single quote denotes the end of the string.‘ ’ - Literal quotes. Removes the special meaning of all enclosed characters. A single quote cannot appear within single quotes because a single quote denotes the end of the string. ` ` - Single Back-Tic quotes. Used for command substitution.` ` - Single Back-Tic quotes. Used for command substitution. Example: echo The date is `date` (interpolation)Example: echo The date is `date` (interpolation) LINES=`wc -l $ENTRY | cut -c 1-7`LINES=`wc -l $ENTRY | cut -c 1-7` LISTING=`ls -l | cut -f 9`LISTING=`ls -l | cut -f 9`
19
Review Command Structure if [ -d "$1" ]if [ -d "$1" ]then action statement fi wc –l - Word count with –l (line option). Print the new line countswc –l - Word count with –l (line option). Print the new line counts ~ - Tilde (~ means /home/dandrear)~ - Tilde (~ means /home/dandrear) for name in *for name in *do action statements done
20
Review Command Structure while [ condition]while [ condition]do action statement(s) done if [ condition ] if [ condition ]then action statement(s) fi
21
Review Command Structure for name in * do action statements done Example: while [ "$1" != "" ] do $size = 0 done
22
Review Command Structure Examples: if [ $# –ne 1 ] then echo “Please enter a command line argument” fi logfile="/var/adm/messages" foreach mon in Sun Mon Tue Wed Thu Fri Sat do grep $mon $logfile > $logfile.$mon end
23
Next Weeks Lab Assignment Review Lab Assignment 2-1 Simple Shell scripting.Review Lab Assignment 2-1 Simple Shell scripting. Lab assignments should be recorded on cs.franklin.edu (Einstein) machine in your “~/itec400/homework” directory.Lab assignments should be recorded on cs.franklin.edu (Einstein) machine in your “~/itec400/homework” directory. Demonstrate how to create a file using the “vi” editor.Demonstrate how to create a file using the “vi” editor. Execute printnum.sh and maxlines.sh scripts on the cs.franklin.edu machine.Execute printnum.sh and maxlines.sh scripts on the cs.franklin.edu machine. Lab Assignment 2-1 will be complemented with script logic. Script logic will be utilized to jump start the lab assignment. It contains script logic, 70% percent of the needed coding, and helpful hints to assist your programming skills. In addition to script logic, you will receive a Shell and Perl Commands Quick Reference document in email.Lab Assignment 2-1 will be complemented with script logic. Script logic will be utilized to jump start the lab assignment. It contains script logic, 70% percent of the needed coding, and helpful hints to assist your programming skills. In addition to script logic, you will receive a Shell and Perl Commands Quick Reference document in email.
24
Break Out Problems 1.Program statement (#!/bin/ksh) 2.less 3.ps –ef | wc –l 4.who | awk ‘{print $1}’ | sort –u | wc –l 5.ps –ef | awk ‘{print $1}’ |sort –u | wc –l 6.find / ex 7.ps –ef | awk ‘{print $9, $1}’ 8.Shell language syntax: $# 9.Shell language command: for name in * 10.Shell language command: NUMBER=$(($NUMBER - 1)) 11. Shell variable: PATH
25
Upcoming Deadlines Lab Assignment 1-1, Obtain a Proctor for Exams, due January 15, 2012.Lab Assignment 1-1, Obtain a Proctor for Exams, due January 15, 2012. Lab Assignment 1-2, Install VMware and Knoppix Virtual Machine, due January 8, 2012Lab Assignment 1-2, Install VMware and Knoppix Virtual Machine, due January 8, 2012 Lab Assignment 1-3, Introduction to Linux, due January 8, 2012Lab Assignment 1-3, Introduction to Linux, due January 8, 2012 Lab Assignment 2-1, Simple Shell Scripting, due January 22, 2012Lab Assignment 2-1, Simple Shell Scripting, due January 22, 2012 Lab Assignment 3-1, Advanced Scripting, due January 29, 2012.Lab Assignment 3-1, Advanced Scripting, due January 29, 2012. Read Chapters 1 and 2 in your text book, Essential System Administration.Read Chapters 1 and 2 in your text book, Essential System Administration. Read Module One listed under the course Web siteRead Module One listed under the course Web site
26
Lab assistance, questions, and chat time Questions?Questions? Comments?Comments? Concerns?Concerns? After each Franklin Live session, I will remain on the session to provide assistance unless otherwise indicated.After each Franklin Live session, I will remain on the session to provide assistance unless otherwise indicated.
27
Have a good week
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.