We present the results of H i and OH absorption measurements towards a sample of radio sources using the Arecibo 305-m telescope and the Giant Metrewave Radio Telescope ( GMRT ) . In total , 27 radio sources were searched for associated 21-cm H i absorption . One totally new H i absorption system was detected against the radio galaxy 3C258 , while five previously known H i absorption systems , and one galaxy detected in emission , were studied with improved frequency resolution and/or sensitivity . Our sample included 17 gigahertz peaked spectrum ( GPS ) and compact steep spectrum ( CSS ) objects , 4 of which exhibit H i absorption . This detection rate of \sim 25 % compares with a value of \sim 40 % by Vermeulen et al . for similar sources . We detected neither OH emission nor absorption towards any of the sources that were observed at Arecibo . We are , however , able to estimate a limit on the abundance ratio of N ( H i ) /N ( OH ) \mbox { \raisebox { -3.0 pt } { $ \stackrel { \textstyle > } { \sim } $ } } 4 \times 10 ^ { 6 } for 3C258 . We have combined our results with those from other available H i searches to compile a heterogeneous sample of 96 radio sources consisting of 27 GPS , 35 CSS , 13 compact flat spectrum ( CFS ) and 21 large ( LRG ) sources . The H i absorption detection rate is highest ( \sim 45 % ) for the compact GPS sources and least for the LRG sources . We find H i column density to be anticorrelated with source size , as reported earlier by Pihlström et al. , a trend which is consistent with the results of optical spectroscopy . The H i column density shows no significant dependence on either redshift or luminosity , which are themselves strongly correlated . These results suggest that the environments of radio sources on GPS/CSS scales are similar at different redshifts . Further , in accordance with the unification scheme , the GPS/CSS galaxies have an H i detection rate of \sim 40 % which is higher than the detection rate ( \sim 20 % ) towards the GPS/CSS quasars . Also , the principal ( strongest ) absorption component detected towards GPS sources appears blue-shifted in \sim 65 % of the cases . This is in agreement with the growing evidence for jet-cloud interactions playing an important role in determining the ionization and kinematical properties of the ambient gas .