Observations indicate that turbulence in the interstellar medium (ISM) is supersonic (M (turb) >> 1) and strongly magnetized (beta similar to 0.01-1), while in the intracluster medium (ICM) it is subsonic (M (turb) less than or similar to 1) and weakly magnetized (beta similar to 100). Here, M (turb) is the turbulent Mach number and beta is the plasma beta. We study the properties of shocks induced in these disparate environments, including the distribution of the shock Mach number, M (s) , and the dissipation of the turbulent energy at shocks, through numerical simulations using a high-order, accurate code based on the weighted essentially nonoscillatory scheme. In particular, we investigate the effects of different modes of the forcing that drives turbulence: solenoidal, compressive, and a mixture of the two. In ISM turbulence, while the density distribution looks different with different forcings, the velocity power spectrum, P (v) , on small scales exhibits only weak dependence. Hence, the statistics of shocks depend weakly on forcing either. In the ISM models with M (turb) approximate to 10 and beta similar to 0.1, the fraction of the turbulent energy dissipated at shocks is estimated to be similar to 15%, not sensitive to the forcing mode. In contrast, in ICM turbulence, P (v) as well as the density distribution show strong dependence on forcing. The frequency and average Mach number of shocks are greater for compressive forcing than for solenoidal forcing; so is the energy dissipation. The fraction of the ensuing shock dissipation is in the range of similar to 10%-35% in the ICM models with M (turb) approximate to 0.5 and beta similar to 10(6). The rest of the turbulent energy should be dissipated through turbulent cascade.