Convert to Waveform using bash script