I cannot find a similar question about SO.
How to properly pass a bash script as an argument to another bash script.
For example, let's say I have two scripts, each of which can take several parameters, I want to pass one script as an argument to the other. Sort of:
./script1 (./script2 file1 file2) file3
In the above example, script2 merges files file1 and file2 together, and echos a new file, however this is not relevant. I just want to know how I can pass script2 as a parameter, i.e. The correct syntax.
If this is not possible, any hint on how I can get around the problem would be appropriate.
source share