Results 1 to 2 of 2
Hi, I need to execute a script that also need to receive some parameters, however, these parameters are included on text file. this text file also has some paramters that ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 03-27-2013 #1
- Join Date
- Mar 2013
receiving parameters - script and txt file
I need to execute a script that also need to receive some parameters, however, these parameters are included on text file. this text file also has some paramters that need to be received. So, how can I do to execute the script? See below the examples:
txt file (call - txt.file):
AA=$1 BB=$2 CC=$3 DD=12345 EE=abcde
(AA, BB and CC receive parameters, DD and EE always have the same value) - parameters $1, $2 and $3 could be passsed using the same line command that the script is executed)
the script receives the txt file to be executed, but before executing, I need filling the parameters on txt file. Suppose that the script calls - tobeexec
I thought that should be something like this:
tobexec < txt.file
but I dont know how to fill the parameters on txt.file before.
Please, if someone knows how to solve it, I would appreciate it a lot.
- 03-27-2013 #2
- Join Date
- Nov 2012
see the source, or . (dot) command, to source txt file in your script.