Skip to content

Instantly share code, notes, and snippets.

@jeffa
Last active July 2, 2024 21:14
Show Gist options
  • Save jeffa/d8edee0e11b274954a27a80fdd1339a2 to your computer and use it in GitHub Desktop.
Save jeffa/d8edee0e11b274954a27a80fdd1339a2 to your computer and use it in GitHub Desktop.
Call me via wget -O - | bash with your name as an argument
#!/bin/sh
if [ -n "$1" ]; then
variable="$1"
elif [ -n "$HELLO_WORLD_VALUE" ]; then
variable="$HELLO_WORLD_VALUE"
else
variable="World"
fi
echo "Hello $variable"
@jeffa
Copy link
Author

jeffa commented Jul 2, 2024

wget -O - https://tinyurl.com/3kvbdr4y | HELLO_WORLD_VALUE="Ur Name" sh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment