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?

  • You can pipe output to another script.
    – Liso
    Commented Jan 28, 2022 at 2:41

1 Answer 1


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".

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .