#!/usr/bin/ksh

#------------------------------------------------------------
#returns the field specifie


#syntax: extract_field string field_number field_separator 
#Note: extract_field 'this is a test' 2



#will return 'is'
#------------------------------------------------------------ 



string=$1
field=$2
separator=$3



#---------------------------------------------------
#extract the field assuming blank space
#construct the batchlog and batchque filenames
#---------------------------------------------------
echo $string
echo $field
result=`echo $string | cut -d ' ' -f$field`









echo $result
exit


