I am trying to run a bash script which downloads and runs another script. The second script contains questions that must be answered by input. I have already attempted to use expect but it fails because the downloaded script runs in bash so it will not spawn the script.
Is there another way to pass input to the script after it downloads and runs?
Here is my script:
#!/bin/bash
mkdir ~/.aws
echo "[default]" >> ~/.aws/credentials
echo "aws_access_key_id = <key here>" >> ~/.aws/credentials
echo "aws_secret_access_key = <key here>" >> ~/.aws/credentials
curl https://s3.amazonaws.com/aws-cloudwatch/downloads/latest/awslogs-agent-setup.py -o LinuxConfigurationScript.sh
chmod +x LinuxConfigurationScript.sh
./LinuxConfigurationScript.sh -r us-east-1
yes | LinuxConfigurationScript.sh -r us-east-1.expect, I'm not certain of another such tool. If I'm automating something, though, I would rather have a single, stable file than downloading a script that may have changed, anyway.--non-interactiveoption that appears to be available for that script? Also, the downloaded script is python, not bash.