[cmbuild3@pghpscmbldl01 ~]$ cat x | xargs -i{} -t ssh {} '[ ! -e wad ] && ln -s /opt/g/ad/stat/wls/ad/; [ ! -e logs ] && ln -s /var/g/ad/logs/wls/ad/ logs '
[cm@pgh ~]$ cat x
adqas@qpada01
adqas@qpada02
adqas@qpada03
adqas@qpada04
etc
Rants and ravings of a semi-autistic developer who has a hard time remembering idiotic nonsense details. Why remember it, when you know where to find it.
Wednesday, October 7, 2009
Execute remote command on multiple boxes oneliner
You'll have to have password less logon with ssh setup for these commands. In this case the blue command is creating symlinks and x has a list of user@host's
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment