Removing characters from end of $string

I am writing a script to search PCL output and append more PCL data to the end accordingly.

I need to remove the last 88 bytes from the string.
I have searched for a few hours now and am coming up with nothing. I can't use head or tail because the PCL output is all on one line. awk crashes on PCL and I cant match it in sed because the last bytes are not constant.

Are there any other shell commands for manipulating strings that would be appropriate for what I've described?

Thanks in advance for any help.
Craig

You don't say which shell you are using. But in ksh, this is easy. If xyz is a variable with more than 88 characters, you can string the last 88 characters off with this:

typeset -L$((${#xyz} - 88)) xyz

Thank you, it works perfectly.

BTW, I am using bash on SCO OS 5.0.2 but the rest of my script runs fine without any changes (other than #!/bin/ksh) in ksh, so all is well.

I am curious though, about ${#xyz} it looks like it would return the length of a string, but if I try to echo this or (${#xyz}) at a shell prompt (ksh), I get an error. Will this work in a shell or is it specific to typeset. The man page I found online is very sparse. I try to understand what I am doing rather than just cut and paste.

Thanks again for your help,
Craig

Nevermind, I just tried it with double parenthesis and it works.

Thanks again.