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.

Slides:



Advertisements
Similar presentations
UNIX Chapter 12 Redirection and Piping Mr. Mohammad Smirat.
Advertisements

Week Four Agenda Announcements Link of the week Review week three lab assignment This week’s expected outcomes Next lab assignment Break-out problems.
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
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.
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 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.
Agenda Administrative Issues Link of the Week Review Week Two Information This Week’s Expected Outcomes Next Lab Assignment Break-Out Problems Upcoming.
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
– Introduction to the Shell 10/1/2015 Introduction to the Shell – Session Introduction to the Shell – Session 2 · Permissions · Users.
The UNIX Shell. The Shell Program that constantly runs at terminal after a user has logged in. Prompts the user and waits for user input. Interprets command.
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 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.
Session 2 Wharton Summer Tech Camp Basic Unix. Agenda Cover basic UNIX commands and useful functions.
Linux+ Guide to Linux Certification, Third Edition
LINUX programming 1. INDEX UNIT-III PPT SLIDES Srl. No. Module as per Session planner Lecture No. PPT Slide No. 1.Problem solving approaches in Unix,Using.
1 System Administration Introduction to Scripting, Perl Session 3 – Sat 10 Nov 2007 References:  chapter 1, The Unix Programming Environment, Kernighan.
Module 6 – Redirections, Pipes and Power Tools.. STDin 0 STDout 1 STDerr 2 Redirections.
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.
1 Operating Systems Lecture 2 UNIX and Shell Scripts.
Week One Agenda IntroductionIntroduction Administrative AnnouncementsAdministrative Announcements Link of the WeekLink of the Week Expected OutcomesExpected.
Unix/Linux cs3353. The Shell The shell is a program that acts as the interface between the user and the kernel. –The shell is fully programmable and will.
Lesson 2-Touring Essential Programs. Overview Development of UNIX and Linux. Commands to execute utilities. Communicating instructions to the shell. Navigating.
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.
Chapter Five Advanced File Processing. 2 Lesson A Selecting, Manipulating, and Formatting Information.
Chapter Four I/O Redirection1 System Programming Shell Operators.
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.
Week 9 - Nov 7, Week 9 Agenda I/O redirection I/O redirection pipe pipe tee tee.
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.
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.
Week One Agenda IntroductionIntroduction Administrative AnnouncementsAdministrative Announcements Link of the WeekLink of the Week Expected OutcomesExpected.
Agenda Introduction Administrative Announcements Link of the Week Expected Outcomes This Week’s Topics Next Week’s Lab Assignment Break Out Problems Upcoming.
Agenda Introduction Administrative Announcements Link of the Week Expected Outcomes This Week’s Topics Next Week’s Lab Assignment Break Out Problems Upcoming.
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 Chapter 4 Exploring Linux Filesystems.
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.
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.
Learning Unix/Linux Based on slides from: Eric Bishop.
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.
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.
Unix Operating System (Week Two)
CSE 303 Concepts and Tools for Software Development
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 Review week two lab assignment This week’s expected outcomes Next lab assignment Break-out problems Upcoming deadlines Lab assistance, questions, and answers Weekly quiz

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, and citation.

Link of the week This is a Knoppix Web site, receive a free and Open Source Live Linux CD. Knoppix is a GNU/Linux distribution that boots and runs completely from CD. It includes Linux software and desktop environments, with programs like OpenOffice.org, The Gimp, Apache, PHP, MySQL and many more open software programs.

Link of the week 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.

Review week two lab assignment drwxrwxrwx permissions (directory) -rwxrwxrwx permissions (file) The exit statement should always contain a return value. 0 indicates normal exit 1 indicates failed exit The return value of a command can be used with conditional or iteration commands.

Review week two lab assignment Users can connect the standard output of one command into the standard input of another command by using the pipeline operator (|). Demonstrate ps -ef ps –ef | wc –l ps –ef | awk ‘{print $2}’ ps –ef | grep dandrear ls –l | cut –c1-3 who –b (time of last system boot) who –d (print dead processes) who –r (print current run level)

Week two lab assignment A process associates a number with each file that it has opened. This number is called a file descriptor. When you log in, your first process has the following three open files connected to your terminal. Standard Input (stdin) : File descriptor 0 is open for reading. Standard Output (stdout): File descriptor 1 is open for writing. Standard Error (stderr): File descriptor 2 is open reading. Demonstrate ls –a > /tmp/output 2>&1 > is equivalent to 1> < is equivalent to <0

Review week two lab assignment A file descriptor is generally an index for an entry in a kernel-resident data structure that contains information on all open files. Each process on the system has its own file descriptor table. A user application passes the abstract key to the kernel through a system call, and the kernel accesses the file for the application.

Review week two lab assignment

The grep command searches the named input file(s) for lines containing a given pattern. Each line found is reported to standard output. Demonstrate: grep UNIX foobar_3 grep ‘^UNIX’ foobar_3 grep ‘UNIX$’ foobar_3 grep pattern foobar_1 grep pattern * The find command lists all pathnames that are in each of the given directories. Demonstrate: find / -type d –print find ~dandrear –type d -print find. –print find / -name foobar

Review week two lab assignment Redirect the standard output of a command to a file. date > /tmp/date_saved Redirect the standard input of a command so that it reads from a file instead of from your terminal. cat < ~dandrear/Winter09_solutions/test.txt Append the standard output of a command to a file. cat foobar_2 >> foobar_1

Review week two lab assignment The Advanced Scripting lab assignment requires two shell scripts to be written. srch.sh srchfile.sh Demonstrate Execution of srch.sh and srchfile.sh Case #1:./srch.sh The srch.sh script will call the srchfile.sh script to perform a specific task. That specific task is task to search a file for a pattern and report it to standard output. When the end of file is reached, control is then returned to the main script, srch.sh.

Review week two lab assignment Shell syntax srchfile.sh $1 $2 original=$PWD cd $original cd $2 listing=`ls –l | cut –c57-80` for file_name in $listing do Action Statements done

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 (keyboard input goes into test_file) cat < test_file (test_file is displayed on terminal) cat foobar_2 >> foobar_1 (append first file to second file) who | sort > test_file.txt The output of the who command is piped to the sort function and written in ascending order in the test_file.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/Winter09_solutions/foobar_1 find ~dandrear –type d -print myArray[1]=$1 $0

Review week two lab assignment Demonstrate /export/home/dandrear/.profile umask 077 Specifies the default permissions for a file and directory Demonstrate The command line arguments are: $0 $1 $2 $3 …./arg_list.sh FIRST_ARG SECOND_ARG

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.

Break out problems $ARGV[0] 3. exit 0 4. unless 5. $NUMBER 6. exit 1 7. $ARGV[1] 8. % (%directory) 9. $ ($quote) 11. diff 12. tr “[a-z]” “[A-Z]” fileout

Next lab assignment Read the text, Programming Perl Chapter One (1) Chapter Two (2) Chapter 32: Standard Modules Chapter 33: Diagnostic Output Messages

Upcoming Deadlines Lab Assignment 3-1 due on 1/29/09 Lab Assignment 4-1 due on 2/5/09 Lab Assignment 7-1 Mid-term exam 2/19/09 Mid term outline will be posted on the Bulletin Board by 2/4/09.

Lab assistance, questions and answers Questions Comments Concerns After class I will help students with their scripts.