#!/usr/bin/env bash echo "Hello world!" if [ $# -gt 0 ]; then echo "Got CLI arguments:" for ((i = 1; i <= $#; ++i)); do echo "$i: ${!i}" done fi if read -t 0 _; then echo "Recieved stdin:" cat fi