<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/3.28.3">
</HEAD>
<BODY>
If in a shell script, you have a variable loaded with a character value, and there is a delimiter, and you want to peel it apart by that delimiter, is there a built-in expression to do that? <BR>
<BR>
Here's what I'm doing, and I'm thinking there should be a better way. <BR>
<BR>
FULLNAME=$1 #eg: CustomerEntry.CreditLimit<BR>
DOT=`expr index $FULLNAME .`<BR>
DOTM1=`expr $DOT - 1`<BR>
TABLE=${FULLNAME:0:$DOTM1} <BR>
FIELD=${FULLNAME:$DOT:40} <BR>
<BR>
<BR>
<TABLE CELLSPACING="0" CELLPADDING="0" WIDTH="100%">
<TR>
<TD>
Neal Rhodes<BR>
President, MNOP Ltd<BR>
Lilburn, GA<BR>
770-972-5430
</TD>
</TR>
</TABLE>
</BODY>
</HTML>