  Linear codes with few weights have applications in secret sharing,
authentication codes, association schemes and strongly regular graphs. In this
paper, several classes of two-weight and three-weight linear codes are
presented and their weight distributions are determined using Weil sums. Some
of the linear codes obtained are optimal or almost optimal with respect to the
Griesmer bound.
