#!/bin/sh # laboratory work 21 # task 12 # subtask 1 FN=$1 FN=${FN:="NULL"} if [ $FN = "NULL" ] then echo -n "Please, enter name of file: " read FN fi PF=$2 PF=${PF:="NULL"} if [ $PF = "NULL" ] then echo -n "Please, enter postfix of first copie: " read PF fi LE=$3 LE=${LE:="NULL"} if [ $LE = "NULL" ] then echo -n "Please, enter the number of copies: " read LE fi LI="1" while [ "$LI" -le "$LE" ] do cp $FN "${FN}${PF}" PF=`echo $PF | tr '1-9a-zA-Y' '2-9a-zA-Z'` LI=`expr $LI + 1` done