Моя ситуация была немного другой, я уже в коде - уже слишком поздно делать новую ФС. У меня есть имя человека с неизвестным количеством слов, но последнее слово - это его фамилия, и оно должно быть заключено в "/"
a=split(prsn,x," ") # Split into 'x' based on a space, 'a'=number of words
prsn="" # reset variable to null
for (j=1;j<a;j++) { # loop through and concatenate all but the last word
prsn=sprintf("%s %s",prsn,x[j])
}
prsn=substr(prsn,2) # we got an extra space in there at the beginning - lose it
prsn=sprintf("%s /%s/",prsn,x[a]) # format the final name
print "1 NAME " prsn # print it