Probing electric characteristics and sorting out metallic from semiconducting carbon nanotubes