morse
Translate text to Morse code
TLDR
SYNOPSIS
morse [-dlps] [-e file] [-w wpm] [-c cpm] [string...]
DESCRIPTION
morse reads input text from arguments or a file and prints the corresponding Morse code. With -s the output is the familiar ... --- ... form; the default form spells out dit and dah. With -p each symbol is played through the system speaker at a configurable speed. With -d the tool performs the inverse translation, converting dots and dashes back to text.Lower-case and upper-case letters are treated the same. Unknown characters are silently skipped.
PARAMETERS
string
Text to encode (or Morse dots/dashes to decode with -d).-d
Decode Morse (dots and dashes) to text.-e file
Read input from file instead of the command line.-l
Generate "line-mode" output suitable for LED flashers.-p
Play Morse audibly via the speaker.-s
Output short dots/dashes instead of "dit"/"dah".-w wpm
Words-per-minute when playing audio (default 20).-c cpm
Characters-per-minute. Alternative to -w.
CAVEATS
Audible output (-p) requires a console or PC speaker; on most modern Linux systems it falls back to nothing unless pcspkr is loaded. The bsdgames implementation ships different flags on Linux and macOS — consult your local man page if the exact flags differ.
HISTORY
morse is one of the classic BSD games, present since early 4BSD distributions as a teaching aid for amateur radio operators.
