fix bad bash coding style: unnecessary echo and command substitution