1

Linux Command within Command

view story
linux-howto

http://stackoverflow.com – My use case is to run a command on multiple servers remotely. I have trust set up between hosts. So i have one command like this: COMMAND 1: for i in 11 12 13 14 15 16; do echo host-name-dev-$i; ssh -q host-name-dev-$i "nohup bash -c 'Place Ur command Here' > foo.out 2> foo.err < /dev/null &"; done And another as: COMMAND 2: rm -rf /floderPath When i combine(COMMAND 1 + COMMAND 2) these two it works fine and subsequent folder is deleted from all hosts. for i in 11 12 13 14 15 16; do echo host-name-dev-$i; ssh -q host-name-dev-$i "nohup bash -c 'rm -rf /floderPath' > foo (HowTos)