% CST8207 Week 11 Notes -- shell scripts % Ian! D. Allen -- -- [www.idallen.com] % Fall 2015 - September to December 2015 - Updated 2015-11-20 02:43 EST - [Course Home Page] - [Course Outline] - [All Weeks] - [Plain Text] Readings, Assignments, Labs, Tests, and ToDo ============================================ Read (at least) these things (All The Words) -------------------------------------------- 1. [Week 11 Notes HTML] -- this file -- **Read All The Words** 2. [Shell Scripts -- lists of commands, executable scripts, script header, command arguments and positional parameters] 3. [Shell command substituion -- interpolate stdout into a command line using $(...) or \`...\`] 4. [Command exit status -- variable $?] 5. [Shell Control Structures -- if, then, else, test, `[...]`][1] 6. [Linux and Sysadmin News in the World] 7. [List of Commands You Should Know] -- keep a notebook! 8. [Video Tutorials on Lynda.com] -- tagged by week number ![Take Notes in Class] Assignments this week --------------------- **Reminder:** There are now two quizzes that you need to complete on Blackboard as part of your term Quiz mark. A third quiz will be posted before the Final Exam. The Quizzes are *not* optional. Check the due date for each assignment and put a reminder in your agenda, calendar, and digital assistant. - Read All The Words, Do, and then Submit via Blackboard: - Bonus (optional) [Assignment #04 HTML] -- the VIM text editor - Bonus (optional) [Assignment #09 HTML] -- Midterm #2 corrections - There is a checking program available to check your file format for this bonus assignment, but only people who Read All These Words will know about it. Wrong format means no marks. - [Assignment #10 HTML] -- tar, processes, syslog, crontab, at, mail, shell script - Really do **Read All The Words**. You don't get a second chance to get it right. Lab work this week ------------------ - [Assignment #10 HTML] -- tar, processes, syslog, crontab, at, mail, shell script - Bonus (optional): Read [The VI (VIM) Text Editor] and optionally do the bonus [Assignment #04 HTML]. - Bonus (optional): Complete bonus [Assignment #09 HTML] about Midterm #2 - There is a checking program available to check your file format for this bonus assignment, but only people who Read All These Words will know about it. Wrong format means no marks. *Do not overwrite your question file with the output of the checking program.* Upcoming tests -------------- Read the [Test Instructions] (all the words) before all your tests and exams. - Final Exam: 8am to 11am (three hours) on December 19 in two rooms T117/T119 - Three Hours! Take a bathroom break before you start the exam. - The final exam emphasizes material after the second midterm test, but it covers the whole course and therefore includes material from **all** the practice question sets. - Take a bathroom break before you sit down for three hours! From the Class Notes link on the Course Home Page ================================================= - [Course Home Page] - [All Weeks] - Review last week. Did you do everything assigned last week? From the Classroom Whiteboard/Chalkboard ======================================== - **Take notes in class!** Your in-class notes would go here. - Bring your notes to class! Stop wasting time looking up commands. - Useful commands for [Assignment #10 HTML]: - `diff file1 file2` -- show the differences between two files - `:set list` -- show the trailing blanks inside the VIM editor - `:set nolist` -- turn off `list` mode Attacks on the Course Linux Server ---------------------------------- - Count the attacks: `fgrep -c "refused connect" /var/log/auth.log` - Another way to count the lines (less efficient): `fgrep "refused connect" /var/log/auth.log | wc` - See the current list of *evil* host IPs: `less /etc/hosts.evil` ![Read All The Words] -- | Ian! D. Allen - idallen@idallen.ca - Ottawa, Ontario, Canada | Home Page: http://idallen.com/ Contact Improv: http://contactimprov.ca/ | College professor (Free/Libre GNU+Linux) at: http://teaching.idallen.com/ | Defend digital freedom: http://eff.org/ and have fun: http://fools.ca/ [Plain Text] - plain text version of this page in [Pandoc Markdown] format [www.idallen.com]: http://www.idallen.com/ [Course Home Page]: .. [Course Outline]: course_outline.pdf [All Weeks]: indexcgi.cgi [Plain Text]: week11notes.txt [Week 11 Notes HTML]: week11notes.html [Shell Scripts -- lists of commands, executable scripts, script header, command arguments and positional parameters]: 700_shell_scripts.html [Shell command substituion -- interpolate stdout into a command line using $(...) or \`...\`]: 710_command_substitution.html [Command exit status -- variable $?]: 720_exit_status.html [1]: 730_control_statements.html [Linux and Sysadmin News in the World]: 950_linux_world.html [List of Commands You Should Know]: 900_unix_command_list.html [Video Tutorials on Lynda.com]: 910_lynda_index.html [Take Notes in Class]: data/remember.jpg "Take Notes in Class" [Assignment #04 HTML]: assignment04.html [Assignment #09 HTML]: assignment09.html [Assignment #10 HTML]: assignment10.html [The VI (VIM) Text Editor]: 300_vi_text_editor.html [Test Instructions]: 000_test_instructions.html [Read All The Words]: ian_algonquin2014_read_all_the_words.jpg "Read All The Words" [Pandoc Markdown]: http://johnmacfarlane.net/pandoc/