>$DEBUG $GTAR "$1" "$2" "$3" "$6" "$7" "$8" "$9" "${10}" "${11}" "${12}"
>"${13}" "${14}" "${15}" "${16}"
Don't do that :-).
>Now, the problem is that parameter nr. 16 may, or may not be filled,
>depending on ...
What you need to do is build up an argument list of your own based on
the input, then **always** use "$@" to pass it on. If you only have to
worry about removing $4 and $5 it's pretty easy:
integer argc=1
for arg
do
if ((argc == 1))
then
set -- # clear the arg list
fi
if ((argc != 4 && argc != 5))
then
set -- "$@" "$arg"
fi
((argc = argc + 1))
done
$DEBUG $GTAR "$@"
...
You can enhance this as needed to actually look at the args inside the
loop and decide whether to pass them on or not, alter them, etc.
Note that as soon as the first "set --" statement is done (when argc is
1), you no longer have access to the original args, so save them away
someplace (maybe in the loop) if you'll need them later.
>Chris Karakas
John R. Jackson, Technical Software Specialist, [EMAIL PROTECTED]