Ported multi-octave feature to the bash script.