IT 244: Introduction to Linux/Unix
Homework 10

Due Sunday, November 19th 11:59 PM

All this work should be done on users3.cs.umb.edu

Deliverables

  1. A shell script named hw10.sh that performs the operations listed below.
    This file should be in an hw10 directory inside your hw directory inside your it244 directory.
    100 points

Requirements

Testing

Steps for Script

Do not use if statements in any of the steps below
  1. On a single line, create the following variables with the values given. On another single command line, create the following variables with the values given. Print all variables and their values to the terminal.
  2. Write a test expression that returns a value indicating true or false when testing whether a is equal to b. Echo the results of this test to the terminal.
  3. Write a test expression that returns a value indicating true or false when testing whether a is less than b. Echo the results of this test to the terminal.
  4. Write a test expression that returns a value indicating true or false when testing whether a plus b is greater than 9. Echo the results of this test to the terminal.
  5. Write a test expression that returns a value indicating true or false when testing whether s1 is equal to s2. Echo the results of this test to the terminal.
  6. Write a test expression that returns a value indicating true or false when testing whether s1 is not equal to s3. Echo the results of this test to the terminal.
  7. Write a test expression that returns a value indicating true or false when testing whether s1 has a length greater than 0. Echo the results of this test to the terminal.
  8. Do the following
  9. Write a test expression that returns a value indicating true or false when testing whether dir1 is a directory. Echo the results of this test to the terminal.
  10. Write one test expression that returns a value indicating true or false when testing whether empty.txt is readable and is writeable. Echo the results of this test to the terminal.