#!/bin/sh -u # $0 [ args... ] # A script that displays the arguments on the command line. # # WARNING: Many of the comments in this file are "Instructor-Type" # comments and are *not* appropriate for real scripts. Do not put # "Instructor-Type" comments into the scripts that you submit for marking. # I put them in my example files because I am teaching you how to # write scripts; do not submit my teaching comments back to me again. # Read the week7.txt notes for more details on good comment style. # # -IAN! idallen@ncf.ca June 2001 # All scripts must start with lines similar to these two: # export PATH=/bin:/usr/bin umask 022 # Without an explicit list of words, "for" loops over the command # line arguments, exactly as if you had said: for var in "$@" ; do count=0 for var do let count=count+1 echo "Command line argument $count is $var" done exit 0