- continue to scripts to work in a constrained environment (as tested
  on a QNAP NAS).

    'readline' has been replaced
    complex 'find's have been replaeced with 'ls' and filters
    ';&' constructs of bash case statements have been removed
    mktemp uses 6 X's  (ie XXXXXX)
    leading zeros on integer values revoved (as they indicate octal)
    replace "grep -f" constructs (as -f option not supported)