0

I wish to call multiple scripts from a single script file, with various inputs and outputs like this:

./file1.sh ip1 ip2 op1

./file2.sh op1 op2

and so on. What I mean is that the output given by running file1 should be input to file2, and file2's output to file3 and so on. There are five files and they are to be called in a sequence. How can I write this?

Artur Meinild
  • 31,035

1 Answers1

0

With the "pipe" symbol, i.e., | you can send the output of one command to the next command as in

command1 | command2 | command3

At a more advanced level, linux also has "named pipes".

vanadium
  • 97,564