Files
bash-scripts/hello/world.sh
2025-09-30 21:35:10 -07:00

16 lines
227 B
Bash

#!/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