#!/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. # ----- # -IAN! idallen@idallen.ca # Use standard search path, friendly umask, ASCII collating and sorting. # Set the language and character set to be ASCII/C standard. # PATH=/bin:/usr/bin ; export PATH LC_COLLATE=C ; export LC_COLLATE LANG=C ; export LANG 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.