I'd like to run a series of concatenated bash commands in a network namespace in one single step, but it seems that ip netns exec mynetns
only takes one bash command as argument.
For instance:
ip netns exec mynetns ip a
...works as expected.
ip netns exec mynetns "ip a ; ip a"
...returns exec of "ip a" failed: No such file or directory
.
Clearly,
ip netns exec mynetns ip a ; ip a
... will return the interfaces in the network namespace and on the host machine.
Is there a way to make it work?
The manual only talks about one command, which is not a very good sign...