Say I want to write a bash script that takes user input, inserts it into a URL and then downloads it. Something like this:
#!/bin/bash
cd /path/to/folder
echo Which version?
read version
curl -O http://assets.company.tld/$version/foo.bar
Would this work? If not, how can I do what I'm trying to do?