2 # functions, strings and other constants for shell scripts
4 # for relation between dit unit and speed in words/min
5 # VVVVV=64, CODEX=60, PARIS=50
7 # default speed [words/minute]
10 # timeout [sec] for fetch operations
13 # function to read config value by name
14 # arguments: configfile name
15 # value in stdout, exit nonzero if error
18 # check if config file readable, else fail
19 test -r "$1" ||
return 2
20 # get last line with name (possibly surrounded by whitespace)
21 retline
=`grep -i "^[ ]*$2[ ]" "$1"|tail -n 1`
22 # fail if nothing found
23 test "$retline" != "" ||
return 1
24 # return second word from read line
25 echo $retline |
{ read _ retval _
; echo $retval ; }