Subject: Bourne shell script help
To: NetBSD Users <netbsd-users@netbsd.org>
From: Andy Ruhl <acruhl@gmail.com>
List: netbsd-users
Date: 07/25/2006 12:29:31
I'm not much of a scripter, but I need to do something specific and
I'm hoping someone can help.

This must be a /bin/sh script for portability, and I need to take 2
characters off of a 14 or so character string and process them
separately in order to know how to continue. If there is some common
unix binary that does it, that would be fine, but it would be
preferable to do it with built in function I guess. Seems like there
is something that can easily do this, I just don't know what it is.

So it would be something like this:

string=<some 14 character alphanum string>

firstchar = "$(`cat $string | getfirstchar`)"
secondchar = "$(`cat $string | getsecondchar`)"

Or something.

Any help would be appreciated.

Andy