Data reported in numerous publications is used as a basis for analyzing the possibility of the generation of shock waves in a flow moving inside a pipe. A piston vibrating at one end of a tube having a nozzle attached to its other end was chosen as the source of the oscillations. The equations of flow of a bubbly liquid are given for the case when long waves propagate in the liquid and a transverse velocity exists in it. Different formulations of the boundary conditions on the nozzle are given, and methods are described for solving the boundary-value problem far from resonance frequencies. The theoretical results obtained by passing to the gas-flow limit agree with the information obtained by other authors and experimental data. It is established that there are frequencies at which periodic hydraulic shocks are generated in the pipes that are examined. Their amplitude is much greater than the amplitude of the shock waves generated during resonance in a column of gas. By varying the initial content of gas in the mixture, the acoustic properties of the nozzle, and the elastic properties of the pipe, it is possible to control oscillations in the flow, alter the resonance frequencies, and eliminate or generate hydraulic shocks. When the frequencies of oscillation associated with the shocks are the same as the natural frequency of the pipe, the latter may undergo large displacements that can ultimately lead to fatigue failure of the pipe or its supports.