Article 52ZQ7 $var does not appear to be passed to command in bash file

$var does not appear to be passed to command in bash file

by
abasel
from LinuxQuestions.org on (#52ZQ7)
I have the following script
Code:#!/bin/bash
read -p "Country Code e.g. US, NZ, UK: " country_var
echo protonvpn c --cc $country_var
sudo protonvpn c -cc $country_var
echo ""
read -n 1 -s -r -p "Press any key to continue"At the command line of I type "sudo protonvpn c -cc US" it works just fine.

The first echo command confirms that the correct code is being passed.

However, when I run the script, it displays the usage instructions i.e. its as if I am not entering the country code.latest?d=yIl2AUoC8zA latest?i=l6qsZ2wJk8g:azwNFtwLwuo:F7zBnMy latest?i=l6qsZ2wJk8g:azwNFtwLwuo:V_sGLiP latest?d=qj6IDK7rITs latest?i=l6qsZ2wJk8g:azwNFtwLwuo:gIN9vFwl6qsZ2wJk8g
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments