If the fundamental frequency of the square wave is 10 Khz, and contains harmonics at f, 3f, 5f, etc., it will have a component at 10 Khz, other at 30 Khz, and another one at 50 Khz.
If the system responds to frequencies in the range between 20 Khz and 40 KHz only, the shape of the response will contain only a 30 Khz sine wave (3rd harmonic of 10 Khz).