Скачать презентацию Sydney Opera House Week Three Agenda Скачать презентацию Sydney Opera House Week Three Agenda

5960463b59fc9a295e25b252ddb364ec.ppt

  • Количество слайдов: 25

Sydney Opera House Sydney Opera House

Week Three Agenda • Administrative Issues • Link of the week • Use of 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 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 PF 321 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 Administrative Issues Student Sign In folder Proctor Information Shell Quick Reference sheet

Link of the week • http: //www. kde. org • http: //www. debian. org Link of the week • http: //www. kde. org • http: //www. debian. org • http: //www. knoppix. com/ What are KDE products? What is debian? What is Knoppix?

Use of the Virtual Machine Caveat: Knoppix software was designed to be used as 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 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 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 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 –f 9` 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 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 srchfile. sh $(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` 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/Fall 08_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 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 "------ File = $PWD/$2 ------" 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 Review week two lab assignment

Review week two lab assignment ls –l | more ls –l | less (count 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 foobar 2 >> foobar 1 (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 Review week two lab assignment > test_file cat /etc/passwd grep x /etc/passwd | cut –d’: ’ –f 1 chmod 705 * chmod 705 test_file grep lines ~dandrear/Fall_solutions/foobar 1 find ~dandrear –type d -print my. Array[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 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 PS 1 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 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 - Practical Extraction and Report Language Perl is Next lab assignment Introduction to 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 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 - 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 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 • • • scalar@ARGV $ARGV[0] exit 0 unless $NUMBER exit 1 Break out problems • • • scalar@ARGV $ARGV[0] exit 0 unless $NUMBER exit 1 $ARGV[1] % (%directory) $ ($quote) @ (@names) diff tr “[a-z]” “[A-Z]” < filein > fileout

Upcoming Deadlines Advanced Scripting Lab Assignment 3 -1 due on 9/30/08. Simple Perl Exercises 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 Questions and Answers • Questions • Comments • Concerns • After class I will help students with their scripts.