#!/bin/bash tools=("gcc-8" "g++-8" "otool" "nm") echo "Platform: `uname -a`" echo "-------------------------------------" echo "Tool info:" echo for tool in "${tools[@]}" do echo "$tool location: `which $tool`" echo "$tool version: `$tool --version|grep -i version`" echo "-------" done