Fall 2017

1pm - 3:30pm

Batmale 413

Course Text

The Linux Command Line, Reference Book for this course written by William Shotts

Course Syllabus

Course Syllabus (subject to change throughout the semester) | SLO Outcomes

Miscellaneous Information

How to Turn In Your Homework Assignments

Computer Access and Use Information

VI Editor for CCSF Faculty | Cheat Sheet

Resources for extra-curricular: Raspberry Pi 3


Quiz 1 is a Take Home Quiz due on Wednesday, 11/1

Quiz 2 will be on Wednesday, 11/22 and will allow the use of Slack

Final Exam Solutions

Labs and Assignments

posted 10/23/17Lab 1 due Monday 10/30 | raw

posted 10/29/17Lab 2 due Monday 11/6 | raw

posted 10/31/17Assignment 1 due Wednesday, 11/15 | raw

posted 11/6/17Lab 3 due Monday 11/13 | raw

posted 11/13/17Lab 4 due Monday 11/20 | raw

posted 11/20/17Assignment 2 due Monday, 11/27 | raw

posted 12/3/17Lab 7 due Monday, 12/11 | raw

posted 12/6/17Assignment 3 due Monday, 12/20 | raw

Course Notes

posted 10/23/17Basic Linux Review | posted 10/24/17More basic linux review notes

posted 10/25/17Command Files vs. Shell Scripts

posted 11/6/17Useful commands for writing shell scripts by Shotts

posted 11/13/17If-Else In-line Testing

posted 11/20/17Functions

Sample Scripts

Week 1: Basic linux commands

helloworld.sh Starting off your code with a shebang

printf.sh printf vs. echo in the bash shell

writeHTML.sh a script to produce an HTML file taken from linuxcommand.org

Week 2: Command substitution

cs160b_Lab1.sh Solution to Lab 1 (demonstrates excellent submission format)

substitution.sh Arithmetic with variables

operator.sh Variable operators

Week 3: Variables, Expansions

Exam 1 Results Includes solution to uptime question #13

If Else Example Includes taking input from command line as well.

args.bash Takes in positional parameters

shiftargs.bash Shows shifting position parameters Boyd's exercise

showargs.bash Tool to help take in arguments

Week 4: If/Test

anycows.bash basic if-else test

countcows.bash counts cows in a single line

dotests.bash do some tests

isit.bash test single argument to see what kind of object it is

isitdirectory.bash test to see if something is a directory

isitfile.bash test to see if something is a file

isitfileordir.bash check if the item is a file or a directory

isithello.bash check whether the argument is hello

isitreadeable.bash check whether argument is readable

isitwriteable.bash check whether the argument is writeable

Week 5: Function Use

Error Functions check for error functions

getfile skeleton getfile skeleton code | getfile solution getfile solution

testscript file for getfile

Week 6: Nested Loops
Week 7: Read While

While Read Loop

Lab 5 Archived

Lab 6 Archived

Final Exam