Hello folks!
Yes, its me again....... ;)
first I would like to thank _everyone_ who has helped me with my little
clone script
and shown me the path from the darkside (no -w no use strict) to the light
side!
I now have one more newb question for the crew here at beginners...
I need to run another system command with the output gathered in an array
for a refresher this is how I am populating the array:
if ($backint or $comp) {
for $server (keys %servers) {
my ($start, $stop) = splice @{ $servers{$server} }, 0, 2;
foreach $name (@{ $servers{$server} }) {
my @output = qx($MMINFO -a -r "savetime,volume,ssid,name" -q
"location=sun_etl,savetime >
$start 1 days ago,savetime < $stop today" -c $name -V -o tR | sort -n -k
4,4 | sort -k 2,2);
shift @output;
print "$server->$name: Cloning " . @output . " savesets\n";
print RPT "Clone report for $name from $start $date to $stop $today\n"
unless (!@output);
for (@output) {
my ($date,$volume,$ssid,$file) = unpack "A9 A15 A11 A*", $_;
for ( $date, $volume, $ssid, $file ) { tr/ //d; }
# Generate clone report
print RPT "$date $volume $ssid $file\n";
# populate @ssids with each ssid that was brought back by $MMINFO
push(@ssids, $ssid);
# little hack to only report the unique occurrences of
# the volumes used for the initial save (volumes == tapes)
unless ($seen{$volume}) {
$seen{$volume} = 1;
push(@uniq, $volume);
}
}
}
}
I need to be able to run a system command and pass it the entire @ssids
array at once as stdin, not individually.
the command line looks like this
nsrclone -b Clone -S -f - < clone_file
I see how I can do all of that, except how to pass the @ssids into the
nsrclone as stdin?
pipe?fork?
Regards,
Ron
==
______
/_____/\ Ronald J. Yacketta
/____ \\ \ Solaris System Engineer
/_____\ \\ / One Pyrex Place
/_____/ \/ / / Elmira, NY 14902
/_____/ / \//\
\_____\//\ / /
\_____/ / /\ / Phone: 607-377-8328
\_____/ \\ \ Fax: 607-377-8329
\_____\ \\ Cell: 607-368-0208
\_____\/ email: [EMAIL PROTECTED]
==
I sense much NT in you.
NT leads to Bluescreen.
Bluescreen leads to downtime.
Downtime leads to suffering.
NT is the path to the darkside.
Powerful Unix is.