Presentation is loading. Please wait.

Presentation is loading. Please wait.

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.

Similar presentations


Presentation on theme: "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."— Presentation transcript:

1 Sydney Opera House

2 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

3 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.

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

5 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?

6 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.

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

8 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

9 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

10 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

11 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

12 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/$2 ------" OUTPUT=`egrep -in $1 $2` echo "$OUTPUT" else echo "error: second argument must be a file" echo "usage: $0 search-pattern file" fi

13 Review week two lab assignment

14 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.

15 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)

16 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

17 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

18 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

19 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.

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

21 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.

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

23 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).

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

25


Download ppt "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."

Similar presentations


Ads by Google