Bash script to run command with prompt for input
In your script you can put :

echo "Input subnet"
read subnet 


to get user input and store it in a variable called subnet.

Obviously there is no check to see if you entered a valid subnet.