get first 4 characters of variable 

Newsgroups: comp.unix.shell
> > How can I get the first 4 character of a variable?
>
> MYVAR2=${MYVAR:0:4}

ksh variant:

typeset -L4 newvar=$MYVAR