[CLUE-Tech] scp command to copy file to multiple host
marcus hall
marcus at tuells.org
Mon Sep 20 09:07:35 MDT 2004
On Mon, Sep 20, 2004 at 10:07:16AM -0400, desh sharma wrote:
> Hi
> Is there one line command to copy file one from HOSTA to HOSTB, HOSTC
> & HOSTD etc?
> like
> hosta# scp -p FILEA root at HOSTB:/root/ root at HOSTC:/tmp root at HOSTD/home/
How about:
for i in HOSTA HOSTB HOSTC HOSTD;do scp -p FILEA root@$i:/root/;done
..
Hey, it *does* fit on one line, therefore it's a one line command, right?
That's what shells are for.
---
Marcus Hall
More information about the clue-tech
mailing list