I have to use a provided script that takes user input while the script is running instead of parameters. I can't get around this.
An example of script would be:
#!/bin/bash
echo "param one"
read one
doSomething
echo "param two"
read two
doSomething
echo "param three"
read three
doSomething
echo "param four"
read four
doSomething
echo "param five"
read five
doSomething
I would like a way to be able to call this script and provide parameterized input, something like:
./scriptNameWrapper.ksh 1 22 333 4444 55555
I've tried googling, and either I'm not asking the question correctly, or more likely I can't see the wood for the trees.
I've tried this, which doesn't work:
#!/bin/bash
./scriptName.ksh
<<$1
<<$2
<<$3
<<$4
<<$5
I'm clearly not a *nix expert, but I'm sure I've seen this done before, I just can't find any examples out there. This is beginning to get frustrating, and any help would be greatly appreciated.