#!/bin/sh -u # Answer file: Exercise #2 - labelcheck1.sh # -Ian! D. Allen - idallen@idallen.ca # Use standard search PATH and friendly umask. # PATH=/bin:/usr/bin ; export PATH umask 022 # This script was assigned before we learned how to check for missing # arguments or unreadable files; so, it has no input validation section. # Optional (recommended): Copy and give the argument a readable name. # file="$1" # Look for each of the seven lines in the script file argument. # grep "Student Name" "$file" grep "Algonquin EMail Address" "$file" grep "Student Number" "$file" grep "Course Number" "$file" grep "Lab Section Number" "$file" grep "Professor Name" "$file" grep "Assignment Name/Number/Date" "$file"