in reply to Need Wisdom on Creating Script to login Mutiple MSA's
The data file part appears to be simple. Perl is excellent at parsing text data files. I'm not sure what an "MSA" is versus an IP address. I would space separated tokens if that is feasible (and I think that it is as whitespaces (\n\t\r\s\f) aren't normally allowed for ip address, user name or password). If "pass phrase" is allowed, minor adjustments can be made below to allow that.
use strict; use warnings; while (<DATA>) { my ($ip,$name,$pwd) = split; print "$ip $name $pwd\n"; # do the command on those params here # } #prints #128.45.123.1 bob qwert #129.1.25.86 jane asfd)(*&^ __DATA__ 128.45.123.1 bob qwert 129.1.25.86 jane asfd)(*&^
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Need Wisdom on Creating Script to login Mutiple MSA's
by kliewc (Initiate) on Aug 17, 2009 at 14:39 UTC |