How do I test whether the first character in an array is a particular character?
i=0
while [ $i -lt $# ]; do
strng=${args[i]};
if [ $strng[0] == '-' ]
echo ${array[i]}
let i=i+1
done
Better yet - can I test the first character in an array of strings for a match?
i=0
while [ $i -lt $# ]; do
array[i]=${args[i]};
if [ $array[i][0] == '-' ]
echo ${array[i]}
let i=i+1
done
Thanks,
-dog