https://unix.stackexchange.com/questions/31414/how-can-i-pass-a-command-line-argument-into-a-shell-script

cat << 'EOF' >test.sh
#/bin/bash

echo $1
EOF
chmod +x test.sh
./test.sh "hello world"