The process of propagating abrupt changes in mass flow formed by partial or complete overlap of one or two ends of a linear section of a pipeline has been studied in the framework of N.E. Zhukovsky. The pressure drop across the pipe is determined by the resistance force, and the propagation velocity of small pressure perturbations is compiled taking into account the compression coefficient of the liquid, the physical and geometric parameters of the pipe. From the initial equations, a parabolic equation for mass flow is constructed, which is solved by the Fourier method. The obtained solution was used to solve the system of equations for hydrostatic pressure. Numerical results are presented that can be interpreted both from the point of view of wave propagation in a compressible and incompressible fluid in a pipeline, and from the point of view of propagation of longitudinal elastic waves in a rod.