
#--------------------------------------------------
# Procedure to filter system version specifications
#
#   Input is received from stdin
#   Output wll be sent to stdout
#
#   Input format
#    <some letters>[-]<dot separated numeric fields>
#
#   Output format
#    <some letters><field1><field2>
#
#   o only the first two numeric fields are kept
#   o separators ('-' or '.') are all filtered out
#
#--------------------------------------------------

read value

c=`echo $value | sed -e 's#[-.0-9]##g'`
v=`echo $value | \
   sed -e 's#[^-.0-9]##g' -e 's#^[^0-9]##' -e 's#[-]#.#g' | \
   cut -d '.' -f1-3 | \
   sed -e 's#[-.]##g'`

echo ${c}${v}

