I am expecting that variable url will be resolved in $() but I am getting variable of variable as url and not "http://testing.com"


echo "Fetching from ${url}"

some_var=$(python somePythonScript.py url)
  • @JeffSchaller thanks for reminding, I was waiting on 4 mins to finish and I moved to another tab. – Vishrant Dec 3 '18 at 7:22

You correctly referenced the variable here:

echo "Fetching from ${url}"

So do the same thing here:

some_var=$(python somePythonScript.py "${url}")

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.