echo Please enter filenames separated by a space :
read list
echo "You entered : "
for aname in $list
do
echo "name : $aname"
done
## or ##
set -A fname
echo "Enter filenames, one on each line. Enter END to quit the input."
cnt=1
an=START
while [ $an == START ]
do
print $cnt
read aname;
# do other validations here
if [ $aname == END ]
then
echo exiting the loop.
an=$aname
else
fname[$cnt]=$aname
(( cnt=cnt+1 ))
fi
done
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.