Change random_port gen from bc to bash