Write a shell script that copies multiple files to a directory.
iter=1
echo Enter new dir:
read nn
mkdir $nn
echo Enter number of files:
read na
while [ $iter –le $na ]
do
echo Enter file name:
read fn
cp $fn $nn
iter=`expr $iter + 1`
done
iter=1
echo Enter new dir:
read nn
mkdir $nn
echo Enter number of files:
read na
while [ $iter –le $na ]
do
echo Enter file name:
read fn
cp $fn $nn
iter=`expr $iter + 1`
done
No comments:
Post a Comment