CS 160B Shell Scripting Syllabus

Fall 2019 8-Week Course
Douglas Putnam

Important Academic Deadlines

CS 160B is a shortened course that has a special set of dates for important academic deadlines. Some of these deadlines are in the first two weeks of the course.

24-OCT-2019 Last day to drop for 100% refund
30-OCT-2019 Last day to drop without a "W"
09-DEC-2019 Last day to drop with a "W"

Note that the last day to drop for refund is Thursday of the first week of the course.

1 Course Information

Table 1: Course information
Course CS 160B Unix/Linux Shell Scripting
CRN 76717
Section 932
Start/End Dates Oct 21, 2019 - Dec 20, 2019
Home The CCSF Learning Management System (Canvas)
Instructor Douglas Putnam
Web http://fog.ccsf.edu/~dputnam
Contact dputnam@ccsf.edu
Important Dates CCSF Academic Calendar

2 Catalog Description

CS 160B Unix/Linux Shell Scripting (2)

Lec-35

Credit, Degree Applicable

P/NP Available

ADVISE: CS 160A or demonstration of CS 160A exit skills

Analyze, design, write, test, and debug shell scripts. Students learn basic shell scripting techniques and develop scripting skills needed for Unix/Linux System Administration courses. The bash shell is used.

UC/CSU

After successful completion of this course, students will be able to:

  • Outcome 1: Use command substitution to capture program output.
  • Outcome 2: Use conditional statements to control the execution of shell scripts.
  • Outcome 3: Write shell scripts to perform repetitive tasks using while and for loops.
  • Outcome 4: Design and implement shell functions.
  • Outcome 5: Identify and process command-line arguments.

Find more details on this course in its official Course Outline of Record

3 Required textbook

4 Disabled Student Programs & Services

Any student who, because of a disability, may require special arrangements in order to meet the course requirements should contact the instructor as soon as possible to make any necessary arrangements. Students should present appropriate verification from Student Disability Services. Please note instructors are not allowed to provide classroom accommodations to a student until appropriate verification from Student Disability Services has been provided. For additional information, you may contact the Student Disability Services office by voice at 415-452-5481, by TDD at 415-452-5481.

For more information about CCSF's DSPS services, please visit the DSPS Web Site.

5 Your RAM ID

Before you can log in to the CCSF learning management system and some other CCSF online services, you will have to claim your RAM ID. If you have problems with the claiming process, contact the CCSF Helpdesk at 415-239-3711 or call toll-free at 844-693-4357.

6 The CCSF LMS

The CCSF learning management system (LMS) is where you will find the course weekly readings, assignments, discussions, exams and grades. This system is often referred to as "Canvas". The CCSF Online Learning Team will send you an orientation email with login instructions before the first day of the semester. To log in to the LMS you need a valid CCSF RAM ID.

7 Methodology

The course is offered 100% online. There are no face-to-face meetings in this course. Most of your time will be spent reading, doing practice exercises, and writing programs to solve problems as part of assignments. The online readings (organized by weeks) provide a structured learning path. Sometimes you will get stuck. At that point you can receive help from me and your classmates by posting your questions to the class discussion forums.

8 How we maintain contact

Although there are no face-to-face meetings in this course and no on-campus office hours, I will maintain contact with you throughout the semester by means of discussion forums, by posting graded questions in the forums, email, and by occasional screencasts. In addition, I'll be making weekly announcements about important academic dates and deadlines, course assignments and quizzes, and other timely matters.

When questions arise about the reading or about a coding assignment, I encourage everyone to post them to the class forums where the entire class can participate in the discussion. I will monitor the forums during the week and answer any unanswered questions.

If you have questions regarding your grades or other private matters, please email me at dputnam (at) ccsf (dot) edu. Monday through Friday I will respond within 24 hours. If you send me an email after 5pm Friday, I will respond first thing Monday when I return.

8.1 Office hours

There are no on-campus office hours for this online course. However, you can always post your questions to the forums 24/7.

9 Weekly effort

This course requires the same commitment as a face-to-face class. In some ways an online course is more challenging because you will be working on your own. You will doing the reading, exercises, exams, and the coding assignments just as you would for a classroom course. Expect to spend about from one to three hours of study time for each unit. For example, a 3-unit course might require from 3 to 9 hours study each week.

Summer session courses taught in 7-weeks or short-term courses taught in 8- or 16-weeks will require proportionately more work per week than an 18-week course.

10 Accounts

As a registered student, you will have two CCSF accounts: one on https://ccsf.instructure.com, CCSF's Learning Management System (LMS), and one on hills.ccsf.edu (Hills), CCSF's Linux server.

Your CCSF LMS and Hills accounts will be automatically created and activated when you are officially registered for the class. The account creation process may take a day or two from the time you register. These two accounts are not related — you will have different user names and passwords for these accounts. Over time all CCSF accounts will be managed with a single set of credentials.

10.1 Hills

Your Hills account (hills.ccsf.edu) is a standard Linux shell account with access to the web server.

10.2 Your initial Hills password

Your RAM ID name and password do not work with your Hills Linux account. Calculate your initial Hills password by following this step-by-step process:

Combine:

  • The first three letters of your birth month, followed by
  • Two numbers for the day of your birth, followed by
  • Two numbers for the year of your birth, then followed by
  • A period (.) and your first and last name initials.

EXAMPLE: If you were born on 8/2/99 and your name is Sheryl Razkofsky, your initial password would be: aug0299.sr.

11 CCSF's Attendance policy

You are expected to academically active in this course. Being academically engaged means that you turn in assignments on time, take scheduled quizzes and exams on time, and participate in graded discussions. You may be dropped without explanation if you are academically inactive for more than 2 weeks in a row.

If you must become temporarily inactive for a short period, contact me by email before your absence so that I do not drop you. CCSF Attendance Policy

12 Class participation

Class participation in this course is implemented with discussion forums. Throughout the semester there will be graded participation assignments that require you to contribute to the class discussion. Class participation is worth 5% or your final grade.

13 Grading

Table 2: Final Grade weighting
Letter %
A 90-100
B 80-89
C 70-79
D 65-69
F < 65
Table 3: How grades are apportioned
Coursework %
Graded assignments 60
Final Exam 15
Ungraded Exercises 10
Quizzes 10
Class participation 5
TOTAL 100

14 Exams & quizzes

All exams and quizzes will take place on the CCSF LMS, including the midterm and final exams.

15 Assignments

This is a skill-building course with weekly ungraded coding exercises and/or graded assignments. Turning in work on time is a gradable component of the exercises and assignments. Definitive due dates for the coursework are always available on the class calendar.

  • You can develop your programs on any computer.
  • If you are in a programming course that uses Ruby, Python, Perl, or PHP course, your code must run correctly on Hills.
  • If you are in a Rails or WordPress/Drupal course, your code will run on your own computer or on a cloud hosting services specified in the assignments.

15.1 Make-up assignments, do-overs, and extra credit

There are no make-up exams or assignments in this course. Once you turn in your work and it's graded, your grade is final. If you fail to turn in work, you cannot do "extra" credit work to make up for not doing the assigned work.

To earn extra credit, complete all of the assigned exercises, assignments, and quizzes, and only then propose an interesting project that you want to pursue for limited additional credit.

15.2 Assignment schedule

  • Assignments will be given weekly by 6 PM Mondays and will be due by 11:59 PM the following Monday. In other words, assignments are due one week after they are given.
  • Solutions to exercises and assignments will be given the Wednesday after the assignment is due. Work turned in after the solutions are given will receive a max score of 50%.
  • If you have questions about the assignments, ask them before the due date.

15.3 Timeliness

  • To receive full credit, turn in your work on time.
  • Assignments turned in late will receive partial credit, with scores reduced by 5 points for each day late.
  • Assignments turned in more than 1 week late will receive a maximum score of 50%.
  • If you have a verifiable documented reason for turning in an assignment late, contact me by email before the assignment is due.

16 Plagiarism

All students must do their own work. If you turn in plagiarized work, or simply turn in the solutions I publish after the assignment due date, be prepared to receive a zero for the assignment, and a code review and grade revision of all of your course work, at the instructor's discretion. See CCSF's Rules of Student Conduct for more information.

17 Collaboration policy

Unless instructed otherwise, collaboration is encouraged on specific components of the coursework. When you collaborate on a graded assignment, you must explicitly credit work done by others.

Not all academic coursework can be collaborative: there are activities that you alone are responsible for. The lists below clarify what coursework can be done in collaboration and what cannot.

17.1 Work you can do with others

  • Exercises, homework, and labs.
  • Discussions with others about general concepts and materials in each course.
  • Presenting ideas and written work to classmates or others for comment or criticism.
  • All participants in a collaboration must be listed when you turn in your work.
  • The class forums cannot be used for collaboration.

17.2 Work you have to do on your own

  • Exams. Exams must be your own work. You cannot submit the work of any other person.
  • You cannot allow anyone else use your user name and/or password to access course material.
  • You cannot engage in any activity that would dishonestly improve your results, or improve or hurt the results of others.
  • You cannot post answers to discussion forums for problems that are being used to assess student performance. You can post your lab solutions on the class forums after the due date has passed.
  • You cannot discuss any currently open exams. If you have questions or comments about the exams, send me an email at dputnam@ccsf.edu.
  • You can discuss exams on the forums once their due date has passed.
  • Do not post solutions for open assignments.
  • Do not use the forums to ask for help with exercises or graded assignments

18 Class discussion forums

Since there are no face-to-face meetings in this course, all class discussion is through the LMS discussion forums. When you have questions about the reading or about a coding assignment, post your questions to the class discussion forums where your classmates can join in the discussion. I will monitor the forum discussions during the weeks and respond when necessary.

If you have a personal question regarding your grade or other matters, please send it to dputnam (at) ccsf (dot) edu.

18.1 Forum Etiquette

Before you ask a question on the forums,

  1. Do the assigned reading before posting a question. The answers to many of your questions are in the reading assignments.
  2. Read through forums to see if your question has already been asked.
  3. Search Google and Stack Overflow for answers to your questions before posting them to the class forums.
  4. Take the time to re-read your questions/answers for errors before actually posting them.
  5. If you post a question, then figure out the answer yourself, don't leave your question hanging — post your answer to your own question.
  6. Be patient. Posting a question to the forum doesn't mean that you will get an instantaneous answer. Don't re-post your question if it's not answered immediately.
  7. When answering questions, refrain from giving your solutions to the assignments. Rather, be a mentor. Give guidance, such as page numbers in the reading or links to relevant resources. You can even show clarifying examples.
  8. No code sharing of open assignments is allowed on the forums. Don't post your lab code on the forums until after the assignment has been closed for two days. The forums are not intended for collaboration — you can collaborate outside of the forums.
  9. Breaches of CCSF Computer Policy are never acceptable.

19 Dropping the course

If you decide to withdraw from the course, it is your responsibility to submit the drop order yourself. I will not drop you from the course unless you become academically inactive. You can log into your CCSF Web4 account to submit the drop order.

19.1 How to drop the course if you are enrolled as a Free City student

Students enrolled under San Francisco's Free City program should be aware of the Free City program's rules about dropping courses. The Free City FAQ covers this question in detail:

What if I drop my course?


  1. What happens if I drop my courses and Free City is paying my enrollment fees?
    • If you drop courses before the date to receive a full refund, you owe nothing. Refund deadlines are next to each course listing on the college website at www.ccsf.edu/Schedule.
    • If you drop after the deadline to receive a full refund, then you are liable for all applicable fees, including enrollment fees/tuition for each course dropped, and the money will be returned to the Free City Program.
  2. What happens if I drop my course and I am receiving a Free City stipend?
    • If you drop all courses, before the refund deadline, you are liable for the stipend.
    • If you drop from full time (12 credits or more) to part time (6-11 credits) after the refund deadline, you are liable to return a portion of the stipend.
    • If you drop below 6 credits, you may be liable to return the stipend.

More information about the Free CCSF program: Free City Frequently Asked Questions. employment and training specialist Steve Nelson <snelson@ccsf.edu>.

20 Tutoring for Computer Science courses

CCSF provides tutoring for students enrolled in Computer Science courses. Follow the instructions on the Learning Assistance Center's Online Tutoring page to create your account. CCSF students get up to 20 hours assistance free per semester.

21 CCSF student code of conduct

Student conduct must conform to College rules and regulations as outlined in CCSF Student Code of Conduct.

22 CCSF Internship and Job Board

The CCSF Internship and Job Board is a free service where registered students and alumni can post resumes and search for internships and jobs and take work experience classes. Students can register for these classes and earn college credit for what they learn while working at paid jobs or internships. For more information contact CCSF&rsquo;s employment and training specialist Steve Nelson <snelson@ccsf.edu>.

23 CCSF Anti-discrimination Policy

The San Francisco Community College District is committed to the principles of equal opportunity, and the prevention of discrimination and harassment in any program or activity of the District on the basis of race, color, ancestry, national origin, ethnic group identification, religion, age, gender, gender identity, marital status, domestic partner status, sexual orientation, disability or AIDS/HIV status, medical conditions, or status as Vietnam-era veteran, or on the basis of these perceived characteristics, or based on association with a person or group with one or more of these actual or perceived characteristics.

If you believe you have been subject to discrimination, please contact Dr. Leilani Battiste, Title 5/EEO/ ADA/Title IX Compliance Officer at (415) 452-5053 or lbattiste@ccsf.edu.

24 Technical problems

If there are technical problems with the CCSF LMS or Hills that prevent you from taking an exam or submitting your assignment, I will extend the deadlines for effected quizzes and assignments. Deadlines will not be extended for technical problems with your personal hardware or network. Problems such as a your hard drive failing, a flaky wi-fi connection at the coffee shop, your computer catching a virus, etc. do not qualify for extensions.

25 Questions?

Got Questions? If you have any questions about this syllabus, please send them in an email to dputnam@ccsf.edu.

26 Appendix

26.1 What are CS 160A Exit Skills?

Before you register for this course, you should have at minimum the skills you would learn in CS 160A. You should be able to:

  1. Create and use Unix file management utilities to manipulate files and directories.
  2. Write and predict the effects of commands that manipulate files and directory permissions.
  3. Employ text file utilities to display, sort, replace, and edit text.
  4. Write and predict the results of Unix commands that use regular expressions to search for patterns in files.

Below is a list of topics you would have learned about in CS 160A. The list is taken from the official CS 160A course outline.

  • History of Unix
    • Families of Unix
    • Unix shells
  • Accessing Accounts
    • Logging on and off
    • Changing passwords
    • Entering commands at the system prompt
    • Using echo to display shell environment variables: TERM, HOME, SHELL, LOGNAME
    • Startup files
    • Remote access using SSH
  • Using Unix Utilities
    • Unix command components and syntax
    • Basic Unix commands
    • uname, hostname, who, whoami, uptime, id
    • date, cal
    • ps, kill
    • man
    • Command delimiters
      • Multiple lines per command
      • Multiple commands per line
      • Standard in, standard out and standard error
      • Input redirection
      • Output redirection including /dev/null
      • Pipes
    • Printing
    • Shell command line editing
      • Shell History and commands (r vs. !)
      • Invoking, changing, searching, and running
  • File Management
    • The Unix file system
      • File names
      • File types
      • Directories and paths: absolute and relative, including the "." and ".." directories
      • Inodes and directory content
    • File management utilities
      • Creating directories with mkdir
      • Navigating using pwd and cd
      • Removing files and directories using rm [-rfi] and rmdir, mv, cp
      • ln: hard and symbolic links and their differences
    • Searching for files
      • Querying using ls [ -adFilLR] and II
      • Use of shell wildcards
      • find -type and -name
    • File Permissions
      • File and directory permissions, owner and group
      • chmod including the octal and symbolic methods
  • Text File Utilities
    • Text file terms and formats
    • Displaying with cat
    • Scrolling and searching with more
    • Horizontal slicing with head and tail
    • Vertical slicing with cut [ -cfd] and paste [ -d]
    • Counting with we
    • Sorting files
      • ASCII sequence
      • Multiple sort fields
      • sort options [-frnubto]
    • Using uniq [ -c]
    • Replacing text with tr and sed
    • lO.Searching with grep using basic regular expressions
    • Text editing using a standard Unix editor
      • Starting and exiting with and without saving
      • Command mode vs. data input mode
      • Commands to move within the file
      • Changing, deleting and copying text
      • Global search and replace
  • Sequential shell scripts
    • Command files vs. shell scripts
      • Command files as input to a shell
      • Changing a command file to a shell script
  • Command exit status and its use with &&
Title: CS 160B Shell Scripting Syllabus
Author: D Putnam
Creator: Emacs 26.3 (Org mode N/A)
Modified: 2019-11-11 Mon 09:52
License: This work is licensed under a Creative Commons Attribution - NonCommercial - NoDerivatives 4.0 International License.
All dates in this document are tentative. Consult the CCSF Academic calendar for official CCSF dates and deadlines.
© Copyright 2010-2019 Douglas Putnam, all rights reserved.