I have a bash script that employs the read command to read arguments to commands interactively, for example yes/no options. Is there a way to call this script i
read
You can put the data in a file and re-direct it like this:
$ cat file.sh #!/bin/bash read x read y echo $x echo $y
Data for the script:
$ cat data.txt 2 3
Executing the script:
$ file.sh < data.txt 2 3