Subject: Re: Bourne shell script help
To: Andy Ruhl <acruhl@gmail.com>
From: None <reed@reedmedia.net>
List: netbsd-users
Date: 07/25/2006 14:43:09
> string=<some 14 character alphanum string>
> 
> firstchar = "$(`cat $string | getfirstchar`)"

 ${string%?????????????}

For example:

 echo ${string%?????????????}

> secondchar = "$(`cat $string | getsecondchar`)"

$ string2=${string%????????????}
$ echo ${string2#?}

This only works when you know the specific length (like your 14).

I would use cut as suggested in other email (or sed).

(Also don't use a space around the equal sign.)