Transmission through a photoexcited semiconductor is used to temporally and spectrally shape a terahertz (THz) pulse. By adjusting the optical pump-THz probe delay, we experimentally introduce a polar asymmetry in the pulse profile as large as 92%. To shape the spectrum, we apply the same technique after strongly chirping the terahertz pulse. This leads to significant reshaping of the spectrum resulting in a 52% upshift of its median value. The pulse shaping techniques introduced here are of particular importance for temporal and spectral shape-sensitive THz nonlinear experiments. (C) 2015 AIP Publishing LLC.