创建100个分机脚本

#!/bin/bash
for ((i=3000;i<3101;i++))
do
echo "[$i]
username=$i
secret=$i
accountcode=$i
callerid="$i" <$i>
mailbox=$i
context=default1
type=friend
host=dynamic
compensate=yes" >> /etc/asterisk/test.conf
done
 
 
 
#!/bin/bash
i=3000
while ((i<3100))
do
echo "$i"
echo "[$i]
username=$i
secret=$i
accountcode=$i
callerid="$i" <$i>
mailbox=$i
context=default
type=friend
host=dynamic
compensate=yes" >> /etc/asterisk/test.conf
 ((i += 1))
done
~                                                                                                                                                                                
~                                                                                                                                                                                
~                                                                                                                                                                                
~                                                                                                                                                                                
~                                                                                                                                                                           

你可能感兴趣的:(创建100个分机脚本)