How to run a command in all the segment simultaneously