extract part of hostname in a script

I need to automate something as part of post processing in a script . Each project is identified by a 3 letter string which is part of hostname and based on hostname I need to copy a particular file to that machine from my distribution .

here are hostnames

pprdifeap01.corp.host.net (where ife is the string I need ) and if so I copy /opt/distribution/ife.cfg to /usr/local/jboss/bin

pprdyamap05.corp.host.net ....if "yam" then cp /opt/distribution/yam.cfg /usr/local/jboss/bin

I have around 10 projects or so with different strings with different config files.

thanks

 
 
#!/bin/ksh
 
vip=pprdifeap01.corp.host.net
 
host=$(echo $vip | awk -F'.' '{ print $1 }')
if [ $host = 'pprdifeap01' ]
then
   echo "host=pprdifeap01"
elif [ $host = 'pprdifeap02' ]
then
   echo "host=pprdifeap02"
else
   echo "Here I am exception"
fi