A survey of ultraviolet circumstellar absorption lines in the spectra of early Be and shell stars