patris has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl open (INFILE, "</root/automate/system.list") || die "could not open sy +stem.list: $!"; @system_list = <INFILE>; close INFILE; foreach $system (@system_list){ `ssh $system date`; #date could be substitute with any unix command like pwd,ls,etc. }
edited: Tue Jun 24 14:47:08 2003 by jeffa - code tags
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: simple iterate and run cmd script
by KPeter0314 (Deacon) on Jun 24, 2003 at 14:57 UTC | |
|
Re: simple iterate and run cmd script
by l2kashe (Deacon) on Jun 24, 2003 at 15:45 UTC | |
|
Re: simple iterate and run cmd script
by kutsu (Priest) on Jun 24, 2003 at 14:50 UTC | |
|
Re: simple iterate and run cmd script
by Tomte (Priest) on Jun 24, 2003 at 14:51 UTC | |
|
Re: simple iterate and run cmd script
by Bilbo (Pilgrim) on Jun 24, 2003 at 14:46 UTC | |
|
Re: simple iterate and run cmd script
by zentara (Cardinal) on Jun 24, 2003 at 18:23 UTC |