Spectral analysis of magnetohydrodynamic fluctuations near interplanetary shocks