NOTE:
The scripts and programs in this directory may have had a ".txt" suffix
added, to make sure that they are treated as text when your browser
downloads them. You may need to remove the ".txt" suffix to compile
or run them on your own computer.
Dec 3 14:03 2005chapter03guide.txtUnix Shells by Example: Chapter 3 Reading Guide Dec 4 03:40 2005chapter04guide.txtUnix Shells by Example: Chapter 4 Reading Guide
Course Notes (alphabetical order)
Sep 1 00:00 2005README.txtREADME - Index to this CST8129 directory Dec 3 16:42 2005abbreviations.txtScript Marking Code comment abbreviations Jan 4 17:50 2005arguments_and_options.txtOptions and Arguments on Unix Command Lines Feb 14 10:26 2006character_sets.txtCollate Order and Character Set - GLOB patterns and accents Oct 20 11:22 2005command_substitution.txtCommand Substitution - $(unix command) Dec 4 00:40 2005data_mining.txtUsing commands and pipes to "mine" and extract data from the system Oct 20 11:14 2005deep_nesting.txtAvoiding deeply nested IF statements (Structured/Un-Structured) Oct 23 19:28 2005exit_status.txtReturn Code, Exit Status, test, if, and while Dec 4 00:22 2005expansion_order.txtOrder of Shell Command Line processing Dec 12 13:16 2005finaldirections.txtDirections and preparing for Test #3 (Final Exam) Oct 20 10:52 2005finding_files.txtSearching for and finding files by name Nov 21 21:38 2005glob_patterns.txtGLOB patterns (wildcard pathname matching) Jan 4 17:18 2005home_and_HOME.txtDirectories: current, HOME, and /home Oct 20 10:57 2005job_control.txtShell background/foreground job control Oct 20 11:17 2005less_code.txtLess Code is Better Code - stop cutting and pasting identical code Oct 20 10:50 2005links_and_inodes.htmlHard links and Unix file system nodes (inodes) Dec 4 00:08 2005linux_lab_access.txtHow to get Access to the Linux Lab from Wherever Sep 1 08:14 2005man_page_RTFM.txtSearching for items in the Unix manual pages (RTFM) Sep 10 05:22 2005miscellaneous.txtMiscellaneous Unix Facts Sep 27 05:47 2011pathnames.txtUnix/Linux Pathnames Sep 1 07:50 2005permissions.txtUnix Permissions Sep 24 07:07 2005practiceCommands_1.txtPractice Unix/Linux Questions #1 Oct 23 22:03 2005practiceCommands_2.txtPractice Unix/Linux Questions #2 Oct 23 22:07 2005practiceCommands_3.txtPractice Unix/Linux Questions #3 Oct 20 12:21 2005quick_tests.txtReturn Code, Exit Status, ||, &&, test, and if Sep 8 12:46 2005quotes.txtUnix/Linux Shell Command Line Quoting Feb 5 16:54 2011redirection.txtUnix Shell I/O Redirection (including Pipes) Dec 3 13:38 2005regular_expression_practice1.txtRegular Expressions - practice examples with commentary Dec 7 02:50 2005regular_expression_practice2.txtRegular Expressions - more practice examples Dec 3 13:39 2005regular_expression_questions.txtRegular Expressions - skill assessment questionnaire Dec 3 13:39 2005regular_expressions.txtRegular Expressions - notes on Basic, Extended, and OddBall Dec 4 00:28 2005review_basic.txtCST8129 Review #1 - Basic Shell Concepts Oct 20 12:24 2005script_checklist.txtShell Script Checklist - a list of things to verify in your shell scripts Oct 20 12:45 2005script_style.txtShell Script Programming Conventions and Style Jan 4 17:41 2005shell_prompt.txtSetting the BASH shell prompt Feb 15 13:19 2005shell_read.txtReading stdin into shell variables - read, EOF, and exec Oct 20 11:08 2005shell_script_execution.txtHow a Shell Script is "Executed" Oct 6 12:22 2005shell_variables.txtShell Variables you should know (including $* and $@) Jan 4 18:10 2005startup_files.txtSetting up Startup Files: .bash_profile and .bashrc Sep 8 12:57 2005terminal.txtUsing telnet/ssh Terminal emulators Oct 6 12:30 2005umask.txtUmask and Permissions Dec 5 00:42 2005unix_command_list.txtBasic Unix/Linux Command List Sep 10 04:52 2005unix_shell.txtThe Unix/Linux Shell Aug 31 15:09 2005vi_basics.txtThe VI (VIM) Editor - Basics
Projects/Labs/Assignments/Exercises (for hand-in)
Sep 7 15:17 2005exercise01.txtExercise #1 for CST8129 due September 7, 2005 Sep 14 15:09 2005exercise02.txtExercise #2 for CST8129 due September 14, 2005 Sep 21 14:26 2005exercise02answers.txtExercise #2 Answers Sep 21 16:25 2005exercise03.txtExercise #3 for CST8129 due September 21, 2005 Sep 28 00:55 2005exercise03answers.txtExercise #3 Answers Oct 5 14:53 2005exercise04.txtExercise #4 for CST8129 due October 5, 2005 Oct 12 14:34 2005exercise04answers.txtIan! D. Allen - idallen@idallen.ca Oct 12 17:09 2005exercise05.txtExercise #5 for CST8129 due October 12, 2005 Oct 20 10:24 2005exercise05script.sh.txtIAN! idallen@idallen.ca Oct 23 06:38 2005exercise06.txtExercise #6 for CST8129 due October 19, 2005 Oct 23 06:42 2005exercise06script1.sh.txtIAN! idallen@idallen.ca Oct 26 14:33 2005exercise07.txtExercise #7 for CST8129 due October 26, 2005 Nov 9 13:32 2005exercise08.txtExercise #08 for CST8129 Nov 9 14:32 2005exercise09.txtExercise #9 for CST8129 due November 9, 2005 Nov 16 02:53 2005exercise10.txtExercise #10 for CST8129 due November 16, 2005 Dec 5 23:31 2005exercise11.txtExercise #11 for CST8129 due December 8, 2005 Nov 23 14:52 2005exercise12.txtExercise #12 for CST8129 due November 23, 2005 Nov 30 14:01 2005exercise13.txtExercise #13 for CST8129 due November 30, 2005
Shell Scripts
Feb 13 04:34 2012argv.sh.txtDisplay on standard error the individual arguments on the command line. Nov 15 13:56 2004backup_nonstructured.sh.txtSpecifications: Nov 15 13:59 2004backup_structured.sh.txtSpecifications: Oct 20 10:27 2005commandline_arguments.sh.txtdemonstrate the use of command line arguments in a script Oct 20 10:27 2005elif.sh.txtSyntax: Oct 20 10:27 2005file_size_classer.sh.txtClassify a file as small, medium, large. Nov 20 04:30 2005g1.sh.txta counting loop containing a small "sleep" Nov 20 04:30 2005g2.sh.txta counting loop adjusted to range from -20 to +20, parabola output Nov 20 04:51 2005g3.sh.txtparabola loop with display X,Y made positive to fit on terminal screen Nov 20 04:51 2005g4.sh.txtparabola loop with display X,Y graphed in terminal using tput Nov 20 07:16 2005g5.sh.txtparabola loop that works on any size terminal screen Nov 20 07:17 2005g6.sh.txtparabola loop using Y = X * X adjusted for terminal display Nov 20 06:22 2005g7.sh.txtfalling object demo showing use of acceleration and deltay variables Nov 20 10:07 2005g8.sh.txtfalling object demo showing use of integer arithmetic scaling factor Feb 25 03:25 2004iftest1.sh.txtWe don't want the usual output of DIFF on the screen, so we throw it away. Feb 25 03:26 2004iftest2.sh.txtFor a list of numeric comparison operators, see the "test" man page. Feb 25 03:26 2004iftest3.sh.txtString comparison uses "=" not "-eq". Feb 25 03:26 2004iftest4.sh.txtSee the "test" man page for a larger list of file-testing operators. Feb 25 03:27 2004iftest6.sh.txtIssue an error message unless exactly one command line argument is given. Feb 25 03:27 2004iftest7.sh.txtPrint an error if the argument is missing, or is not a file. Nov 20 07:21 2005input_trap.sh.txtusing SIGINT interrupt traps to change variables in running scripts Oct 20 10:25 2005integer_sort.sh.txtread three integers and sort them Nov 20 07:23 2005interrupts.sh.txtdemo script to try two different SIGINT trap lines Oct 20 10:25 2005optional_args1.sh.txtDemonstrate method 1 for prompting for missing command line arguments. Oct 20 10:25 2005optional_args2.sh.txtDemonstrate method 2 for prompting for missing command line arguments. Oct 20 10:25 2005optional_args3.sh.txtDisplay PWD MAIL HOME replaced by optional command line arguments. Dec 8 04:55 2005parabolas.sh.txtinterruptible parabolas, fast or slow, on any size terminal window Oct 20 10:25 2005passwd_string_finder.sh.txtlook for an optional string in the Unix password file Oct 20 10:25 2005path_tester.sh.txtPerform several tests on the first argument to this script. Oct 20 10:25 2005path_validator.sh.txtValidate a single command line argument (file or directory). Oct 20 10:26 2005shellread.sh.txtdemonstrate the use of the shell "read" built-in command Oct 14 17:06 2003showtest.sh.txtThis script runs in "debug" mode (see the -x above). Oct 20 10:26 2005sort_top_five.sh.txtThis scripts sorts a file and displays the top 5 lines. Oct 20 10:26 2005string_compare.sh.txtThis script compares two strings: an argument and stdin. Dec 4 04:20 2005sumcol_v1.awk.txtsimple shell script using an AWK script to sum a given column of numbers Dec 4 04:16 2005sumcol_v2.awk.txtfull shell script using an AWK script to sum a given column of numbers Oct 20 10:26 2005wait_login.sh.txtSyntax: $0 userid Oct 20 10:27 2005weather1.sh.txtA weather script to show the current temperature in Ottawa Oct 20 10:27 2005weather2.sh.txtA weather script to show the current temperature in Ottawa. Oct 23 06:11 2005while1.sh.txtSyntax: $0 number increment Oct 23 03:50 2005while2.sh.txtSyntax: $0 (no arguments) Oct 23 04:27 2005while_user1.sh.txtSyntax: $0 number Oct 23 04:28 2005while_user2.sh.txtSyntax: $0 number
Program Source
Sep 24 07:03 2005argv.c++.txtThe output appears on "standard error", not "standard output". Sep 24 07:04 2005argv.c.txtThe output appears on "standard error", not "standard output". Jan 24 02:43 2004stdxxx.c++.txtProduces output on stdout and stderr, prompts and reads from stdin.