Question: Using the bash shell, create an English to Morse Code translator. The script will take a string as it's only parameter. The script will handle

Using the bash shell, create an English to Morse Code translator. The script will take a string as it's only parameter. The script will handle capital letters, numbers and space only. The script will use an associative array to look up the English letter and find its matching Morse Code. Between each code will be a ",SP,", and at the end of the line an EOT. If there is a space at the beginning "SP," or end ",SP" of the line there will only be one comma needed.

As an example when morse "a b c" is entered, the result will be

.-,SP,-...,SP,-.-.,EOT

Here is the Corse Code table:

Using the bash shell, create an English to Morse Code translator. The

International Morse Code 1. The length of a dot is one unit. 2. A dash is three units 3. The space between parts of the same letter is one unit. 4. The space between letters is three units 5. The space between words is seven units

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!