diff options
| author | tv <tv@also> | 2011-04-24 13:23:14 +0200 | 
|---|---|---|
| committer | tv <tv@also> | 2011-04-24 13:23:14 +0200 | 
| commit | a735e187e28266912fa94028ccb5006398fc5fca (patch) | |
| tree | fb2d7ce472a8e889c902d272ef24fe73b7673842 | |
| parent | ed18b51bb535da53b4fdbbd09936badea3256cc9 (diff) | |
morse.sh: add more function comments
| -rwxr-xr-x | morse.sh | 6 | 
1 files changed, 5 insertions, 1 deletions
| @@ -5,6 +5,7 @@ freq=2000  dit=60  mode=compile+execute +## plain stupid options "parser"  while test $# -gt 0; do    case "$1" in      (-l) dit=$2; shift 2;; @@ -18,6 +19,8 @@ done  # Ein Dah ist dreimal so lang wie ein Dit.  dah=`echo "$dit * 3" | bc` +## Convert a character to the corresponting morse code. +## Note: any unknown characters are left unaltered.  char2morse() {  tr [a-z] [A-Z] |  sed ' @@ -123,6 +126,7 @@ sed '  '  } +## Convert morse code to beep(1) arguments.  morse2beeparg() {  sed "    s: : -n -f 1 -l $dit:g @@ -142,7 +146,7 @@ execute() {    `morse2beeparg`  } - +## main - process either [any non-option] arguments or stdin.  if test $# -gt 0; then    echo "$*"  else | 
