Butte College

Course Outline

2026-2027 Catalog

CSCI 25 - Linux 1: Shell Scripting and Programming

Catalog Description

Transfer Status
CSU
Unit(s)
3.00
  • Lecture: 34.00 Contact hours/68.00 Out of class hours/102.00 Total hours/2.00 Unit(s)
  • Lab: 51.00 Contact hours/0.00 Out of class hours/51.00 Total hours/1.00 Unit(s)
  • Total: 85.00 Contact hours/68.00 Out of class hours/153.00 Total hours/3.00 Unit(s)

Course Description: This course introduces a variety of the tools and concepts used while working with a UNIX/Linux-based computer system. Students will learn to write shell scripts using basic commands and regular expressions. They will then use those tools to write scripts first with basic shell commands, then with grep, sed, and awk, then with more advanced decision-making and flow control commands. Other scripting tools such as Perl and Python will also be explored. Students will write shell script programs to exercise their understanding of tools and concepts. This course will be taught using a combination of lectures, demonstrations, discussions, and hands-on labs. (C-ID ITIS-135).

Objectives

Upon successful completion of this course, the student should be able to:

  1. Construct regular expressions containing metacharacters for use at the command line or in shell scripts.
  2. Demonstrate proficiency using: grep to search for regular expressions in files; the vi editor for creating and editing text files; sed to perform editing tasks useful in shell scripts; and awk for manipulating data and generating reports.
  3. Write shell scripts: using command substitution to capture program output; to perform repetitive tasks using while and for loops; using conditional statements to control the execution of shell scripts design and implement shell functions; and identify and process command-line arguments.
  4. Write shell scripts using Bash, demonstrating knowledge of the appropriate environment commands to accomplish tasks such as data search and retrieval, file editing, system administration and backup.
  5. Write a simple program using PERL, Python, and/or to access a MySQL database.

Course Content

Topic Titles / Suggested Time Topic

Lecture

Lecture topics and suggested hours
TopicsLec Hrs

The Shells:

  1. The Bourne Again Shell (bash)
  2. Precursors to the BASH shell (such as Bourne and Korn)
  3. The Tenex C (TC) Shell (tcsh)
4.00

Shell Scripting:

  1. Process management, job control, and automation
  2. Using text processing and filters in your scripts
  3. Working with commands
  4. Exploring expressions and variables
  5. Performing arithmetic operations in shell scripts
  6. Automating decision making in scripts
  7. Working with functions
  8. Using advanced functionality and repetition in scripts
  9. System startup and customizing a Linux system
15.00

Programming Tools:

  1. Programming the Bourne Again Shell (bash)
  2. Programming control structures
  3. The AWK Pattern Processing Language
  4. Design reports using AWK
  5. The sed Editor
  6. Construct sed scripts to facilitate editing documents in batch
  7. The Perl Scripting Language
  8. Compare the Perl language to shell scripts
  9. The Python Programming Language
  10. Compare Python to shell scripting
  11. The MySQL Database Management System
  12. Demonstrate ways to store data in an organized way in a DB
10.00

Getting started and working with shell scripting:

  1. The Linux and Mac OS X Operating Systems
  2. The Utilities
  3. The Filesystem
  4. The Shell
  5. The vim Editor
5.00
Total Hours:34.00

Lab

Lab topics and suggested hours
TopicsLab Hrs

Getting started and working with shell scripting

  1. The Linux and Mac OS X Operating Systems
  2. The Utilities
  3. The Filesystem
  4. The Shell
  5. The vim Editor
7.00

The Shells:

  1. The Bourne Again Shell (bash)
  2. Precursors to the BASH shell (such as Bourne and Korn)
  3. The Tenex C (TC) Shell (tcsh)
4.00

Shell Scripting

  1. Process management, job control, and automation
  2. Using text processing and filters in your scripts
  3. Working with commands
  4. Exploring expressions and variables
  5. Performing arithmetic operations in shell scripts
  6. Automating decision making in scripts
  7. Working with functions
  8. Using advanced functionality and repetition in scripts
  9. System startup and customizing a Linux system
20.00

Programming Tools:

  1. Programming the Bourne Again Shell (bash)
  2. Programming control structures
  3. The AWK Pattern Processing Language
  4. Design reports using AWK
  5. The sed Editor
  6. Construct sed scripts to facilitate editing documents in batch
  7. The Perl Scripting Language
  8. Compare the Perl language to shell scripts
  9. The Python Programming Language
  10. Compare Python to shell scripting
  11. The MySQL Database Management System
  12. Demonstrate ways to store data in an organized way in a DB
20.00
Total Hours:51.00

Methods of Instruction

  1. Demonstrations
  2. Group Discussions
  3. Lecture
  4. Multimedia Presentations

Methods of Evaluation

  1. Quizzes
  2. Projects
  3. Homework
  4. Lab Projects
  5. Mid-term and final examinations
  6. Examinations

Examples of Assignments

Reading Assignments

  1. Read the manual (man) page for the grep utility, taking note of the options that are available when executing this command. Be prepared to write grep commands to solve a series of problems in class.
  2. Read the article "In the Beginning was the Command Line" by Neal Stephenson. Be prepared to discuss the culture of Linux as presented by Stephenson, in particular the "Egypt analogy" and the Debian distribution.

Writing Assignments

  1. Write a one-page vi "starter guide" for a person who has never used the vi editor. In your guide, include a brief description of the history and key features of vi and an annotated list of the vi commands you consider to be most important for a new user to learn.
  2. Using the LinuxCareer.com website as a starting place, and internet research to gather additional information, write a 1-2 page report detailing the current demand for Linux professionals in the workforce, and the specific Linux skills required of these professionals.

Out-of-Class Assignments

  1. Based on the commercial use case provided by the instructor, write a report detailing your recommendations for an open source web server and database server. Be sure to address security issues in your recommendation.
  2. Design and implement a shell script to perform a backup of your home directory and all of its contents, including all directories, sub-directories, hidden files, and non-hidden files. Your script should compress the backup into a tarball. Test your script thoroughly and be prepared to demonstrate your working script in class.

Recommended Materials of Instruction

Bresnahan, C., & Blum, R. (2019). LPIC-1 Linux Professional Institute Certification Study Guide Exam 101-500 and Exam 102-500. Wiley, 5th. 9781119582120.

Suehring, S. (2019). LPIC-1 Linux Professional Institute Certification Practice Tests: Exam 101-500 and Exam 102-500. Wiley, 2nd. 9781119611097.

Shotts Jr., W. (2019). The Linux Command Line: A Complete Introduction. No Starch Press, 5th. 9781593279523.

Sobell, M. (2017). A Practical Guide to Linux Commands, Editors, and Shell Programming. Addison-Wesley Professional, 4th. 9780134774602.

Robbins, A. (2016). Bash Pocket Reference: Help for Power Users and Sys Admins. O'Reilly, 2nd. 9781491941591.

Zero Cost Textbook

Shotts, Jr., W. (2019) The Linux Command Line. http://linuxcommand.org/tlcl.php

Minimum Qualifications

Computer Information Systems

Computer Science (Masters Required)

Computer Service Technology