#!/bin/sh -u # demonstrate the use of command line arguments in a script # ----- # Syntax: $0 filename userid # ----- # Purpose: # Display the given filename on the terminal of the given userid. # ----- # Student Name: Ben Dover # Algonquin EMail Address: abcd0001 # Student Number: 074-210-779 # Course Number: DAT2330 # Lab Section Number: 014 # Professor Name: Ian Allen # Assignment Name/Number/Date: Exercise 3.1416 due July 31, 2023 # ----- # -IAN! idallen@idallen.ca # Use a standard search path and friendly umask for the commands in this script. # PATH=/bin:/usr/bin ; export PATH umask 022 # copy the two command line arguments to variables with readable names # filename="$1" userid="$2" # send the file to the given userid # write "$userid" <"$filename" # The script exits with the return status of the last command executed.