Linux command
morse 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Translate text to Morse code (dots and dashes)
morse -s "[Hello World]"
Translate plaintext to audible Morse (speaker)
morse -p "[Hello World]"
Decode Morse dots/dashes back to text
morse -d "[.... . .-.. .-.. ---]"
Read text from a file instead of arguments
morse -e [file.txt]
Adjust words-per-minute when playing audio
morse -p -w [20] "[CQ]"
说明
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.
参数
- -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.
FAQ
What is the morse command used for?
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.
How do I run a basic morse example?
Run `morse -s "[Hello World]"` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -d do in morse?
Decode Morse (dots and dashes) to text.