In addition to what has already been said, you're not looking for a field separator, you're looking for a field fill character. There are several ways to do this, here are two:
Could you please try the following, not sure if it is good, but I tried my best to do this. Please take a look and see if this helps. Let us say input file is check_OFS_and_variable.
if [[ -f file_temp1 ]]
then
rm file_temp1
fi
if [[ -f file_temp ]]
then
rm file_temp
fi
echo "enter the number of dash you want"
read v
nine=9
if [[ $v -ge $nine ]]
then
b=`awk -F" " 'NR==1 {print$1}' check_OFS_and_variable`
a=`awk -F" " 'NR==2 {print$1}' check_OFS_and_variable`
e=`echo $b | wc -c`
f=`echo $a | wc -c`
##echo $e
let "t = v + e"
let "p = t - f"
##echo $p
OFS=`echo "-"`
i=0
value1_1=`awk -F" " 'NR==1 {print$1}' check_OFS_and_variable`
value1_2=`awk -F" " 'NR==1 {print$2}' check_OFS_and_variable`
echo $value1_1
value2_1=`awk -F" " 'NR==2 {print$1}' check_OFS_and_variable`
value2_2=`awk -F" " 'NR==2 {print$2}' check_OFS_and_variable`
echo $value1_1 >> file_temp
while [[ $i -le $v ]]
do
echo $OFS >> file_temp
let "i = i +1"
done
echo $value1_2 >> file_temp
i=0
echo $value2_1
echo $value2_1 >> file_temp1
while [[ $i -le $p ]]
do
echo $OFS >> file_temp1
let "i = i + 1"
done
echo $value2_2 >> file_temp1
awk '{print $0}' ORS="" file_temp
echo "\n"
awk '{print $0}' ORS="" file_temp1
else
echo "print enter more than 9 times."
fi