#!/bin/bash EXT=js DIST=ts for name in `ls *.${EXT}`; do mv $name ${name%.${EXT}}.${DIST} done : Function; global. BlockNumDB RelayMode LoadHistoryMessage LastLoadedBlockNum