LJ Archive

Listing 2. Handle Options

# handle options
options hfbp: "$@"
shift $options_shift_val
if [ -n "$opt_h" ]
then
    Usage "$USAGE" "$USAGE1""$USAGE2"
    return
fi
if [ -n "$options_missing_arg" ]
then
    Usage "$USAGE"\
   "Missing argument for -$options_missing_arg"
    return
fi
if [ -n "$options_unknown_option" ]
then
    Usage "$USAGE"\
   "Unknown option -$options_unknown_option"
    return
fi
if [ $options_num_args_left -eq 0 ]
then
    Usage "$USAGE"\"No directory specified"
    return
fi
LJ Archive