Spectral line-by-line shaping is a key enabler towards optical arbitrary waveform generation, which promises broad impact both in optical science and technology. In this paper, generation of optical and microwave arbitrary waveforms using the spectral line-by-line shaping technique is reviewed. Compared to conventional pulse shaping, significant new physics arises in the line-by-line regime, where the shaped pulse fields generated from one laser pulse now overlap with those generated from adjacent pulses. This leads to coherent interference effects related to the properties of optical frequency combs which serve as the source in these experiments. We explore such effects in a series of experiments using several different high-repetitionrate optical combs, including harmonically mode-locked lasers and continuous-wave lasers that are externally phase modulated either with or without the help of an optical cavity. As an application of line-by-line pulse shaping, we describe generation of microwave electrical arbitrary waveforms that can be reprogrammed at rates approaching 10 GHz.Significance of line-by-line shaping: combining optical frequency combs with spectral pulse shaping