mk offer a simple way to
perform some selection according to the spectral types.To select stars which have a spectral type corresponding to that given on the command line, use the keyword ts and the command line
mk ts -eq "spectral type"
One can however extend the selection, because wild cards are recognised.
The format of the spectral type entered on the command line should contain a white space between the spectral class and the luminosity class, like, for example, B8 V, A2 V or K0 III, but note the form B85IV.
mk ts -eq B8 V lists the stars of type B8 V.
mk ts -eq B. V lists all B stars of luminosity class V