#-------------------------------------------------- # Procedure to filter system version specifications # # Input is received from stdin # Output wll be sent to stdout # # Input format # [-] # # Output format # # # o only the first one numeric field is kept # o separators ('-' or '.') are all filtered out # #-------------------------------------------------- export LC_ALL=C exec sed -n ' h s#[-.0-9]##g x s#[^-.0-9]##g s#^[^0-9]## y#-.# # s#^\([0-9]*\) *.*#\1# G s#\(.*\)\n\(.*\)#\2\1#p '