Sydney Opera House. Week Three Agenda Administrative Issues Link of the week Use of the Virtual Machine Review week two lab assignment This week’s expected.

Slides:



Advertisements
Similar presentations
Week Four Agenda Announcements Link of the week Review week three lab assignment This week’s expected outcomes Next lab assignment Break-out problems.
Advertisements

Week One Agenda IntroductionIntroduction Administrative AnnouncementsAdministrative Announcements Link of the WeekLink of the Week Expected OutcomesExpected.
CS Lecture 03 Outline Sed and awk from previous lecture Writing simple bash script Assignment 1 discussion 1CS 311 Operating SystemsLecture 03.
Linux+ Guide to Linux Certification, Second Edition
Guide To UNIX Using Linux Third Edition
Guide To UNIX Using Linux Third Edition
Guide To UNIX Using Linux Third Edition
Introduction to Unix (CA263) Introduction to Shell Script Programming By Tariq Ibn Aziz.
CMPE 151: Network Administration Spring Class Description Focus: system and network administration. Sequence of exercises. E.g., installing/configuring.
Unix Shell Scripts. What are scripts ? Text files in certain format that are run by another program Examples: –Perl –Javascript –Shell scripts (we learn.
Introduction to Linux and Shell Scripting Jacob Chan.
Week Two Agenda Announcements Link of the week Use of Virtual Machine Review week one lab assignment This week’s expected outcomes Next lab assignments.
Sydney Opera House. Week Three Agenda Administrative Issues Link of the week Review week two lab assignment This week’s expected outcomes Next lab assignment.
Week One Agenda IntroductionIntroduction Administrative AnnouncementsAdministrative Announcements Link of the WeekLink of the Week Expected OutcomesExpected.
Introduction to Shell Script Programming
Week One Agenda IntroductionIntroduction Administrative AnnouncementsAdministrative Announcements Link of the WeekLink of the Week Expected OutcomesExpected.
Week One Agenda IntroductionIntroduction Administrative AnnouncementsAdministrative Announcements Link of the WeekLink of the Week Expected OutcomesExpected.
Week One Agenda IntroductionIntroduction Administrative AnnouncementsAdministrative Announcements Link of the WeekLink of the Week Expected OutcomesExpected.
Week 7 Working with the BASH Shell. Objectives  Redirect the input and output of a command  Identify and manipulate common shell environment variables.
Agenda User Profile File (.profile) –Keyword Shell Variables Linux (Unix) filters –Purpose –Commands: grep, sort, awk cut, tr, wc, spell.
Chapter Four UNIX File Processing. 2 Lesson A Extracting Information from Files.
Guide To UNIX Using Linux Fourth Edition
CENT 305 Information Systems Security Linux Introduction.
Week Three Agenda Administrative Issues Link of the Week Review Week Two Information This Week’s Expected Outcomes Next Lab Assignment Break-Out Problems.
Computer Programming for Biologists Oct 30 th – Dec 11 th, 2014 Karsten Hokamp  Fill out.
Week Two Agenda Announcements Link of the week Use of Virtual Machine Review week one lab assignment This week’s expected outcomes Next lab assignments.
Week Two Agenda Announcements Link of the week Use of Virtual Machine Review week one lab assignment This week’s expected outcomes Next lab assignments.
Shell Script Programming. 2 Using UNIX Shell Scripts Unlike high-level language programs, shell scripts do not have to be converted into machine language.
Session 2 Wharton Summer Tech Camp Basic Unix. Agenda Cover basic UNIX commands and useful functions.
Linux+ Guide to Linux Certification, Third Edition
Linux Operations and Administration
UNIX Shell Script (1) Dr. Tran, Van Hoai Faculty of Computer Science and Engineering HCMC Uni. of Technology
1 System Administration Introduction to Scripting, Perl Session 3 – Sat 10 Nov 2007 References:  chapter 1, The Unix Programming Environment, Kernighan.
Agenda Link of the week Use of Virtual Machine Review week one lab assignment This week’s expected outcomes Review next lab assignments Break Out Problems.
Week Four Agenda Announcements Link of the week Review week three lab assignment This week’s expected outcomes Next lab assignment Break-out problems.
Week One Agenda IntroductionIntroduction Administrative AnnouncementsAdministrative Announcements Link of the WeekLink of the Week Expected OutcomesExpected.
Week Two Agenda Announcements Link of the week Use of Virtual Machine Review week one lab assignment This week’s expected outcomes Next lab assignments.
Week Two Agenda Announcements Link of the week Use of Virtual Machine Review week one lab assignment This week’s expected outcomes Next lab assignments.
Week Two Agenda Announcements Link of the week Use of Virtual Machine Review week one lab assignment This week’s expected outcomes Next lab assignments.
Week Three Agenda Administrative Issues Link of the Week Review Week Two Information This Week’s Expected Outcomes Next Lab Assignment Break-Out Problems.
Week One Agenda IntroductionIntroduction Administrative AnnouncementsAdministrative Announcements Link of the WeekLink of the Week Expected OutcomesExpected.
Sydney Opera House. Week Three Agenda Administrative Issues Link of the week Use of the Virtual Machine Review week two lab assignment This week’s expected.
1 © 2000 John Urrutia. All rights reserved. Session 5 The Bourne Shell.
Chapter Six Introduction to Shell Script Programming.
Week Three Agenda Administrative Issues Link of the week Review week two lab assignment This week’s expected outcomes Next lab assignment Upcoming deadlines.
Week Two Agenda Announcements Link of the week Use of Virtual Machine Review week one lab assignment This week’s expected outcomes Next lab assignments.
Lesson 3-Touring Utilities and System Features. Overview Employing fundamental utilities. Linux terminal sessions. Managing input and output. Using special.
Week Three Agenda Administrative Issues Link of the Week Review Week Two Information This Week’s Expected Outcomes Next Lab Assignment Break-Out Problems.
Week One Agenda IntroductionIntroduction Administrative AnnouncementsAdministrative Announcements Link of the WeekLink of the Week Expected OutcomesExpected.
Week Five Agenda Link of the week Review week four lab assignment This week’s expected outcomes Next lab assignment Break-out problems Upcoming deadlines.
Week Four Agenda Link of the week Review week three lab assignment This week’s expected outcomes Next lab assignment Break-out problems Upcoming deadlines.
Linux+ Guide to Linux Certification, Second Edition
1 Week 8 Creating Simple Shell Scripts. 2 Chapter Objectives  In this chapter, you will :  Learn how to create Shell Scripts  Commenting / Making Portable.
CS 403: Programming Languages Lecture 20 Fall 2003 Department of Computer Science University of Alabama Joel Jones.
Week Two Agenda Announcements Link of the week Use of Virtual Machine Review week one lab assignment This week’s expected outcomes Next lab assignments.
Week Two Agenda Announcements Link of the week Use of Virtual Machine Review week one lab assignment This week’s expected outcomes Next lab assignments.
Week Two Agenda Announcements Link of the week Use of Virtual Machine Review week one lab assignment This week’s expected outcomes Next lab assignments.
Week Two Agenda Announcements Link of the week Use of Virtual Machine Review week one lab assignment This week’s expected outcomes Next lab assignments.
Linux Administration Working with the BASH Shell.
Week Four Agenda Announcements Link of the week Review week three lab assignment This week’s expected outcomes Next lab assignment Break-out problems.
INTRODUCTION TO SHELL SCRIPTING By Byamukama Frank
Week Two Agenda Announcements Link of the week Use of Virtual Machine
Week Three Agenda Link of the Week Review Week Two Information
Sydney Opera House.
Shell Script Assignment 1.
CSE 303 Concepts and Tools for Software Development
INTRODUCTION TO UNIX: The Shell Command Interface
Week Three Agenda Link of the Week Review Week Two Information
Chapter Four UNIX File Processing.
Linux Shell Script Programming
Presentation transcript:

Sydney Opera House

Week Three Agenda Administrative Issues Link of the week Use of the Virtual Machine Review week two lab assignment This week’s expected outcomes Next lab assignment Break-out problems Upcoming deadlines Questions and answers

Administrative Issues Lab assignments such as LDAP, Reiser File System, and open source papers shall follow APA documentation style. Franklin University utilizes the following course book in the PF321 class: Professional Foundations Learning Strategies Grading will focus on capitalization, punctuation, spelling, and citation.

Administrative Issues Student Sign In folder Proctor Information Shell Quick Reference sheet

Link of the week What are KDE products? What is debian? What is Knoppix?

Use of the Virtual Machine Caveat: Knoppix software was designed to be used as a Live CD because of specific features that make it’s performance and stability very suitable. It has been noted in several articles that Knoppix works best from a Live CD. Knoppix enthusiasts have attempted to install this software on a hard disk and encountered problems in the process. These problems are most pronounced when installing updates and new software.

Use of the Virtual Machine Linux KDE (K Desktop Environment) Tray buttons icons - K Menu - Home - Konsole - Konqueror Web browser - Iceweasel Web browser (Firefox)

Review week two lab assignment The Advanced Scripting lab assignment requires two shell scripts to be written. - srch.sh - srchfile.sh The srch.sh script will call the srchfile.sh script to perform a specific task. That task is to search a file for a pattern and report it to standard output. When the file search ends, control is then returned to the main script (srch.sh). The command line format to execute the srch.sh script is as follows:./srch.sh Example:./srch.sh then. Example:./srch.sh if Example:./srch.sh done /bin

Review week two lab assignment Command line format to execute the srchfile.sh script is as follows:./srchfile.sh Example:./srchfile.sh then printnum.sh Shell syntax review srchfile.sh $1 $2 original=$PWD cd $original cd $2 listing=`ls –l | cut –f9` for file_name in listing do Action statements done

Review week two lab assignment Shell syntax for srch.sh script #!/bin/ksh Original=$PWD if [ Fill in test condition ] then echo "error: must provide 2 arguments" echo "usage: $0 search-pattern file" elif [Fill in test condition ] then echo "error: must provide 2 arguments" echo "usage: $0 search-pattern file" elif [Fill in test condition ] then srchfile.sh $(missing syntax) $(missing syntax) elif [Fill in test condition ] then Action statement fi

Review week two lab assignment cd (missing syntax) listing=`(missing syntax) | cut -f 9` for (missing syntax) in $listing do if [ -f (missing syntax) ] then / export/home/dandrear/Fall08_solutions/srchfile.sh $1 (missing syntax) fi done fi cd $original

Review week two lab assignment Syntax for srchfile.sh script #!/bin/ksh if [Fill in test condition ] then echo "error: must provide 2 arguments" echo "usage: $0 search-pattern file" elif [Fill in test condition ] then echo "error: must provide 2 arguments" echo "usage: $0 search-pattern file" elif [Fill in test condition ] then echo " File = $PWD/$ " OUTPUT=`egrep -in $1 $2` echo "$OUTPUT" else echo "error: second argument must be a file" echo "usage: $0 search-pattern file" fi

Review week two lab assignment

ls –l | more ls –l | less (count the fields/use “q” to quit) ls -a (does not hide entries) less man (utilizes the less command for reading online documentation). cat > test_file.txt (keyboard input goes into test_file.txt) cat < test_file.txt (test_file.txt is displayed on terminal) cat foobar2 >> foobar1 (append first file to second file) who | sort > test_out.txt The output of the who command is piped to the sort function and written in ascending order in the test_out.txt file.

Review week two lab assignment > test_file cat /etc/passwd grep x /etc/passwd | cut –d’:’ –f1 chmod 705 * chmod 705 test_file grep lines ~dandrear/Fall_solutions/foobar1 find ~dandrear –type d -print myArray[1]=$1 $0 Demonstrate the.profile settings umask 077 (specifies what permissions the system should remove)

Review week two lab assignment HOME = Is set to the full path name of your login directory (/export/home/dandrear) PATH = Contains the command search path. It is set to a series of path names separated by colons (:). SHELL = This entry may be set by the system administrator to the path name of a shell interpreter other than the standard bash. TERM = Specifies what terminal you are using. TMOUT = Variable contains the integer attribute. If you set the value greater than zero, ksh terminates if you do not enter a command within the prescribed number of seconds after ksh issues the PS1 prompt. MAIL = Name of your Mail files EDITOR = Pathname for your editor

Week’s 2 & 3 expected outcomes Upon successful completion of this module, the student will be able to: Create scripts using shell/Perl variables and program control flow. Use redirection and pipes to combine scripts and executables. Use man page system and find script tools. Discuss Perl Language

Next lab assignment Introduction to Perl Perl - Practical Extraction and Report Language Perl is a simple language - Compiles and executes like a shell script or a batch file - Perl doesn’t impose special growth limitations on arrays and data strings - Perl is a composite of C, AWK, and Basic - Originally developed to manipulate text

Next lab assignment Perl’s range of flexibility - System administration - Web development - Network programming - GUI development Major features - Procedural Programming Sequence or unstructured statements Includes routines, subroutines, methods, or functions - Object Oriented Programming Module uses “objects” and their interactions to design applications and computer programs.

Next lab assignment Major features (continued) - Powerful built-in support for text processing - Large collection of third-party modules.

Next lab assignment Read Chapters 1 and 2 in Programming Perl text book Review Chapter thirty two (32), pages 865, 899 Review Chapter thirty three (33) provides diagnostic messages for output errors.

Break out problems $ARGV[0] exit 0 unless $NUMBER exit 1 $ARGV[1] % (%directory) diff tr “[a-z]” “[A-Z]” fileout

Upcoming Deadlines Advanced Scripting Lab Assignment 3-1 due on 9/30/08. Simple Perl Exercises Lab Assignment 4-1 due on 10/7/08. Mid-term exam Lab Assignment 7-1 will be administered 10/21 (Tuesday). Mid term outline will be posted on the Bulletin Board by 10/7/08 (Tuesday).

Questions and Answers Questions Comments Concerns After class I will help students with their scripts.