In article <20031003131943.A13414@trebor.iglou.com>,
Bob Stockler <bob@trebor.iglou.com> wrote:
>Since you said "ksh", use its parameter substitution:
>
> myvar="123.4567"
> myvar=${myvar%[0-9][0-9]}
>
>If the value might be:
>
> 123.45
> 123.456
> 123.4567
> 123.45678
> ......
>
>use a case-esac construction to supply the proper
>parameter substitution for the input variable.
Or something like:
a=123.45678
tail=${a#*.??}
[[ $tail != $a ]] && a=${a%$tail}
John
--
John DuBois
spcecdt@armory.com KC6QKZ/AE
http://www.armory.com/~spcecdt/