So I need to create a script that writes in a file details about phone calls. The file needs to contain: -CALLING_NUMBER -> which starts with 0742, 0743 and 0744, the rest of the digits being randomly generated ( 10 in total )
-CALLED_NUMBER -> which starts with 07 and the rest of the digits also random
-START_DATE -> the start date of the phone call, in format yyyy-mm-dd hh24:mm:ss. For all phone calls, the start date needs to be from the same day and cover all the hours in that day
-END_DATE -> the end date of the phone call, in the same format, greater than the start date, randomly generating the extra seconds between 0-7200
-CALL_TYPE -> if the duration of the call is 1 sec, it return SMS, if it is longer, it returns VOICE
I did the CALLING_NUMBER and the CALLED_NUMBER and the CALL_TYPE is pretty straight forward once you have end and start date. I am having troubles with the start and end date.
GNU bash,version 3.2.25(1)-release (x86_64-redhat-linux-gnu)
Thanks!