0

ntopng can handle multiple network interfaces and I've a script that takes the name of the interface and outputs it in to stdout. I can pipe this output into ntopng

my_packet_tracer.sh | ntopng -i -

And I see the Interface in ntopng admin panel as stdin

enter image description here

I would like to run my script for the second network interface and also pipe the output in to ntopng, but since it is already running I can not start second process.

How could I pipe the output of two scripts as arguments of ntopng in following way?:

my_pkg_trace.sh eth0 >--,
                        |-- ntopng -i output1 -i output2
my_pkg_trace.sh wan  >--'
khashashin
  • 155
  • 1
  • 1
  • 5
  • 1
    Does this work: `ntopng -i <(my_pkg_trace.sh eth0) -i <(my_pkg_trace.sh wan)`? If it does, we can probably close as a duplicate of [Process substitution and pipe](https://unix.stackexchange.com/q/17107). – terdon Nov 24 '21 at 20:19

1 Answers1

1
ntopng -i <(my_pkg_trace.sh eth0) -i <(my_pkg_trace.sh wan)
Hauke Laging
  • 88,146
  • 18
  • 125
  • 174