#!/bin/sh -u # # $0 [ arguments...] # # A script that classifies arguments given on the command line # to tell if they are empty (the empty string) or not. # # A list is built by the script and output at the end. # # -IAN! idallen@ncf.ca June 2001 export PATH=/bin:/usr/bin umask 022 # Start with an empty list and append the non-empty arguments # arglist="" for arg do if [ "$arg" = "" ]; then echo "Found an empty argument." else arglist="$arglist $arg" fi done echo "The list of non-empty arguments is: $arglist" exit 0