(This could be homework.)
I am not sure i am understanding you correctly but I assume you want the sounds to be like morse code...
This will generate a single tone.
https://www.unix.com/shell-programmin...ator-demo.html
It is up to you to work out morse code with it which is not difficult...
Alternatively if it as voice you want the look at "cat" and use it to record raw voice data directly to disk, as <number>.raw using a laptop's internal mic for ease of use...
This assumes that you have /dev/dsp as a device.
Not sure why you need <number>.wav but if that is a requirement then look at SOX for doing all of the above...