diff --git a/nodemgmt-scripts.sh b/nodemgmt-scripts.sh index 6227e868..5c953f70 100755 --- a/nodemgmt-scripts.sh +++ b/nodemgmt-scripts.sh @@ -826,10 +826,18 @@ RUN_COMMAND(){ echo -e " ${idsST[Bold]}${idsCL[LightCyan]}${NM_HOSTNAMES[${nip}]}[${nip}]${idsST[Reset]} ${idsCL[LightYellow]}${LH}${idsCL[Default]}" DIVIDER false green # echo "Running command: ${NCMD} ${RUNCMD}" - [ "${NCMD}" != "" ] && ${NCMD} "${RUNCMD}" || ${RUNCMD} + command_output=$([ "${NCMD}" != "" ] && ${NCMD} "${RUNCMD}" || ${RUNCMD}) touch /tmp/nmg.run.${nip} - DIVIDER false green - echo + if [ "${command_output}" != "" ]; then + echo ${command_output} + DIVIDER false green + echo + else + echo "Command was run, but not output was generated." + DIVIDER false green + echo + fi + fi done echo