Energetic particle spectra in finite shocks: the earth's bow shock