  We present an exact numerical study of the scaling of density and momentum
distribution functions of harmonically trapped one-dimensional bosons with
repulsive contact interactions at zero and finite temperatures. We use path
integral quantum Monte Carlo with worm updates in our calculations at finite
interaction strengths, and the Bose-Fermi mapping in the Tonks-Girardeau
regime. We discuss the homogeneous case and, within the local density
approximation, use it to motivate the scaling in the presence of a harmonic
trap. For the momentum distribution function, we pay special attention to the
high momentum tails and their $k^{-4}$ asymptotic behavior.
