/**
 * CS139 - Programming Fundamentals
 * Department of Computer Science
 * James Madison University
 * @version Spring 2016
 */

Unix CLI Lab

Introduction

STOP! Don't start this lab until you have a partner. You should complete this lab by working together on a single workstation. Talk through the steps of the lab as you go. Switch places periodically so that you both have an opportunity to type.

Instructions

Work through the first four parts of the following tutorial:

UNIX Tutorial for Beginners

If you don't finish during the lab period today you should plan on completing this before the next lab period.

If You Have Extra Time

  • Take a few minutes to browse through this list of terminal commands:
    http://ss64.com/bash/
  • Complete the following command-line challenges. Each solution should fit on a single line, possibly by chaining together multiple commands using pipes ("|") , and/or redirecting output (">").
    • Reads your lab1.txt file, removes all lines containing the word "the" and writes the result to no_the.txt.

      HINT: search for "invert" in the man page for grep.

    • Reads in your lab1.txt file, removes all lines containing the word "the", removes all lower-case "e"'s, and writes the result to no_the_no_e.txt.

      HINT: Look into the tr command

    • Performs the operations from the previous exercise on all files in the current directory, and writes the results to a single file named all.txt

Finishing Up

The grading for this lab will be based on attendance. Enter the "word of the day" in Canvas in order to register your attendance.