#!/usr/bin/env bash #Create variables out of shell commands SPACE=`df -h` MESSAGES=`tail /var/log/messages` LS=`ls -l` #Assign to an array(list in Python) CMDS=( "$MESSAGES" "$SPACE" ) function runCommands () { count=0 for cmd in "${CMDS[@]}"; do let count++ printf "Running Command Number %s \n" $count echo "$cmd" done } #Run function runCommands