#! /bin/csh -f # # Filename: broadcast # # Programmer: Br. David Carlson # # Date: March 28, 1994 # # This C shell program sends the file given as the first command line # parameter to everyone whose ID is given in the file that is the # second command line parameter. # if ($#argv != 2) then echo "Two parameters needed." echo "Syntax: broadcast " exit 1 else if (! -r "$argv[1]") then echo "Cannot read file" "$argv[1]" exit 2 else if (! -r "$argv[2]") then echo "Cannot read file" "$argv[2]" exit 3 else elm -k `cat "$argv[2]"` < "$argv[1]" exit 0 endif