The simplest way to do this is to press Ctrl+Z (pause the script) after you've finished entering the input data and then
bg which will send the script to the background and continue running it. You can then use your current shell session normally.
A better approach, however, is to modify your script so that it doesn't require any user input. Just pass whatever input you need as arguments when launching the script. This will make your life and the life of your users easier.
For example, instead of this:
echo "Give me the first number! "
echo "Give me the second number! "
And run your script like this (where
30 are example numbers which will be saved as
script.sh 10 30 > out 2>err&
That way, the script will be sent to the background immediately, any output will be redirected to the file called
out and any error messages to the file called
err. All parameters have been set up at launch time and no further interaction is needed.
As a general rule, avoid making scripts require user input whenever possible. Having to type in stuff to feed a script is laborious, error prone, much harder to automate and makes it harder to repeat the same operation later.