untested but it should get you pretty close
#!/bin/sh
if [ $# -gt 26 ]
then
echo "Too many args!"
exit 1
fi
letters="a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z"
cli="myprog"
count=1
operation=""
for argument in $*
do
count=`expr $count + 1`
letter=`echo $letters | head +$count | tail -1`
cli="$cli -$letter ${argument}/${argument}.ext"
if [ -z "$operation" ]
then
operation=$letter
else
operation="${operation}+${letter}"
fi
done
cli="$cli -operation \"$operation\""
$cli
-->
Code:
#!/bin/sh
if [ $# -gt 26 ]
then
echo "Too many args!"
exit 1
fi
letters="a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z"
cli="myprog"
count=1
operation=""
for argument in $*
do
count=`expr $count + 1`
letter=`echo $letters | head +$count | tail -1`
cli="$cli -$letter ${argument}/${argument}.ext"
if [ -z "$operation" ]
then
operation=$letter
else
operation="${operation}+${letter}"
fi
done
cli="$cli -operation \"$operation\""
$cli
|