#!/bin/sh
# Small script to get the kernel minor version
# Made by Dmitry V. Levin for the ALT Linux modutils package.
# Based on the kernelversion script from modutils package.
# Helper functions from Bruce Perens to replace cut

pick1() {
    eval 'echo $'"$pick_index"
}
pick() {
    local OLD_IFS="$IFS"
    local delimiter="$1"
    shift
    pick_index="$1"
    shift
    IFS=" "$delimiter
    pick1 $*
    IFS="$OLD_IFS"
    unset pick_index
}

version=$(uname -r)
echo `pick . 2 $version`
