CIS 170 - Introduction to UNIX

Course Documentation

Assignments

  1. Unix/Linux basics (due 2/2/13)
  2. Filesystem basics (due 2/16/13)
  3. Wildcard expansion, links, basic file proccessing (due 2/24/13)
  4. File processing, editors, processes (due 3/2/13 - not accepted late)
  5. Regular expressions (due 3/27/13)
  6. Scripting: comments and variables (due 4/6/13)
  7. Scripting: selection (due 4/13/13)
  8. Scripting: repetition (due 4/20/13)
  9. Scripting: functions (due 4/27/13)
  10. Scripting: awk and sed (due 5/4/13)

Notes

  1. Course overview (1/14/13)
  2. logging in (1/14/13)
  3. OS basics (1/16/13)
  4. UNIX and Linux history (1/16/13)
  5. shell basics (1/16/13)
  6. getting help (1/16/13, 1/23/13)
  7. command line structure (1/23/13)
  8. filesystem basics (1/23/13)
  9. filesystem commands (1/28/13)
  10. general system commands (1/28/13)
  11. file handling commands (1/30/13)
  12. communication and networking commands (2/4/13)
  13. file details and access permissions (2/4/13, 2/6/13)
  14. hard and soft (symbolic) links (2/6/13)
  15. wildcard expansion (globbing) and brace expansion (2/11/13)
  16. redirection and piping (2/13/13)
  17. searching for files (2/13/13)
  18. file manipulation commands (cut, paste, uniq, tr) (2/13/13, 2/18/13)
  19. sorting (2/18/13)
  20. processes, jobs, and signals (2/25/13)
  21. text editor: vi (2/25/13)
  22. text editor: emacs (2/25/13)
  23. text editor: nano/pico (2/25/13)
  24. file compression and archiving commands (2/27/13)
  25. modifying the prompt (2/27/13)
  26. Midterm exam review (2/27/13, 3/4/13) (abridged - full version posted Sunday, 3/3/13)
  27. Midterm exam review (complete) (posted 3/3/13)
  28. Midterm exam (3/6/13)
  29. regular expressions and grep (3/18/13, 3/20/13)
  30. scripting basics: getting started, variables, exit status (3/25/13, 3/27/13, 4/1/13)
  31. scripting: tests (4/1/13)
  32. scripting: selection (4/1/13, 4/3/13)
  33. scripting: repetition (4/8/13)
  34. heredocs (4/10/13)
  35. scripting: functions (4/10/13, 4/15/13)
  36. formatted output (4/17/13)
  37. scripting: arithmetic (optional)
  38. menus (optional)
  39. scripting: arrays (optional)
  40. scripting: trapping signals (4/17/13)
  41. answered questions on scripting problems (4/22/13, 4/24/13)
  42. scripting: sed (4/29/13)
  43. scripting: awk (5/1/13)
  44. Installing packages on Linux. Using a Linux GUI. (5/6/13)
  45. Q & A; help with assignments (5/6/13, 5/8/13)
  46. Final exam (5/15/13 10:00 A.M. - 11:50 A.M.)

Sample programs from Spring 2013

  1. demo001: comments in a script
  2. demo002: shebang line
  3. demo003: setting and displaying variables
  4. demo004: displaying existing (shell) variables
  5. demo005: reading user input into a variable
  6. demo006: displaying variable values, displaying a blank line
  7. demo007: special variables ($0: name of script) and command substitution: $()
  8. demo008: special variables: number of arguments ($#) and positional arguments ($1, $2, ...)
  9. demo009: special variables: displaying and setting exit status
  10. demo010: testing number of arguments and displaying a "Usage" error message
  11. demo011: getting user input and testing it
  12. demo012: doing file tests; filename provided as an argument
  13. demo013: doing file tests; filename provided as user input
  14. demo014: repetition: simple for loops
  15. demo015: repetition: processes each command line argument
  16. demo016: repetition: keep looping until user enters a password
  17. demo017: repetition: keep looping until user enters a password at least four characters long
  18. demo018: function: defining and calling a simple function
  19. demo019: function: checking and using an argument passed to a function
  20. demo020: generate and display a random number
  21. demo021: function: simulate die rolls with a function and a return status
  22. demo022: function: simulate die rolls with a function and command substitution
  23. demo023: function: arguments to functions are unique from the arguments to the script
  24. demo024: translating lower case to upper case
  25. demo025: translating lower case to upper case using a function

Sample programs from Spring 2012

  1. s01.html: basic scripting example
  2. s02.html: calling another script from within a script
  3. s03.html: using a variable
  4. s04.html: using special variables
  5. s05.html: using special variables
  6. s06.html: getting user input
  7. s07.html: capturing command output
  8. s08.html: testing a string
  9. s09.html: testing a string, selection
  10. s10.html: selection, testing integers
  11. s11.html: selection, testing files
  12. s12.html: file tests and logical operators
  13. s13.html: nested selection and random numbers
  14. s14.html: user input validation
  15. s15a.html: multi-branch selection
  16. s15.html: user input validation using a loop
  17. s16.html: user input validation of an integer
  18. s17.html: simple "for" loop repetition
  19. s18.html: "for" loop repetition over script arguments
  20. s19.html: multi-branch selection using "case"
  21. s20.html: various types of "for" loops
  22. s21.html: validating user input using a while loop
  23. s22.html: defining and calling a function
  24. s23.html: use a function to obtain, validate, and return user input
  25. s24.html: obtain random numbers in a range with an exclusion
  26. s25.html: validate user input using a function and a loop
  27. s26.html: use a sed script to rearrange fields in records
  28. s27.html: calling scripts from within other scripts
  29. s28.html: basic sed substitution and line delete
  30. s29.html: sed transliteration (like tr command)
  31. s30.html: using several sed commands together
  32. s31.html: basic awk script with BEGIN and END patterns
  33. s32.html: displaying one field in a record using awk
  34. s33.html: using awk to display a record number and record
  35. s34.html: using awk to display records that match a pattern
  36. s35.html: using a counter variable in awk
  37. s36.html: displaying and counting records based on the number of fields in awk
  38. s37.html: matching a particular field in awk
  39. s38.html: matching a field based on field length in awk

Useful links

Return Links

Mr. Klick's Home Page