Goal: I have saved the IP addresses of some computers into a file. Execute the command "cat /etc/hostname" on every computer that is listed in this file.
Content of a file called "targets":
192.168.1.122
192.168.1.123
192.168.1.124
192.168.1.125
Command:
dsh -f ./targets -c -- "cat /etc/hostname"
Output:
192.168.1.122: alpha
192.168.1.123: delta
192.168.1.124: sierra
192.168.1.125: client
Keine Kommentare:
Kommentar veröffentlichen