I have a script to call on a file

#Define Variables
username=`awk -F: '{print $1}' /tmp/new.webhost`
userweb=`awk -F: '{print $2}' /tmp/new.webhost`
userpass=`awk -F: '{print $3}' /tmp/new.webhost`

#Do this!
useradd -g 200 -s /bin/false -d /webs/$userweb $username
chmod -R 755 $userweb
chown -R $username $userweb
chgrp -R webhosting $userweb
echo $userpadd | passwd $username --stdin
echo "<VirtualHost>" >> /etc/httpd/conf/named-virtual.conf
echo "DocumentRoot /webs/$userweb" >> /etc/httpd/conf/named-virtual.conf
echo "ServerName $userweb" >> /etc/httpd/conf/named-virtual.conf
echo "</VirtualHost>" >> /etc/httpd/conf/named-virtual.conf
/etc/rc.d/init.d/httpd restart

My problem is when it reads a file with more than one line of delimited text, it adds that field in all at the same time! Instead of running it many times!


useradd -g 200 -s /bin/false -d /webs/cuban.com
usa.com cuban usa

I would like for it just it repeate the useradd, and the rest of the commands by running the line over and over... Is this possible?

How can I solve this?