Wernher Eksteen wrote:
Thank you for correcting and showing me a better different way to do the while
loops, but instead of the
two for loops printing the following out:
emcpowera sdbd sddg sdfj sdhm # <- [1st for loop output]
emcpoweraa sdae sdch sdek sdgn # These the available emcpower disks and
their associate devices
emcpowerbc sdb sdbe sddh sdfk
emcpowerc sdbb sdde sdfh sdhk
emcpowerd sdba sddd sdfg sdhj # <- [end of 1st for loop]
emcpowera1 /dwpdb006 # <- [2nd for loop output]
emcpoweraa1 /dwpdb033 # These are the local emcpower* disk
paritions and their local mount points.
emcpowerbc1 /s00_11 # Note that the emcpowerbc disk has 2
partitions, 1 and 2 below.
emcpowerbc2 /utl_file_dir
emcpowerc1 /odsdb006
emcpowerd1 /odsdb005 # <- [end of 2nd for loop]
How can I match the emcpower partitions ie: emcpowera1 as a result from the 2nd
loop, to the emcpower disks
ie: emcpowera as a result from the 1st loop.
What I would like to do is to compare what (emcpower\w+\d) partitions ie:
emcpowera1 (seen from the output of
the 2nd for loop), where mounted against the available list of the
(emcpower\w+) disk devices ie: emcpowera
(found in the 1st output) and then match on the (emcpower\w+) disk found (from
1st output). The result of the
output of the matched partition found (2nd output) must concatenate to the
result of the emcpower disk (1st output),
and then also show the (emcpower\w+) disks (from 1st output) that wasn't
matched, if any.
In other words,
If emcpowera1 was found (from 2nd output), to match with emcpowera (from 1st
output) and display the result
along with the mount point that was found for emxpowera1 like this:
emcpowera sdbd sddg sdfj sdhm emcpowera1 /dwpdb006
If there are any (emcpower\w+) disks ie: emxpowerz that wasn't matched by a
(emxpower\w+\d) partition ie: emxpowerz1,
to then only display normal output found in loop 1, because it doesn't have a
matching partition ie:
emcpowerz sdbg sddv sdfd sdht
If there are more than one (emcpower\w+\d) partition, to display the output for
example like this:
emcpowerbc sdb sdbe sddh sdfk emcpowerbc1 /s00_11
emcpowerbc2 /utl_file_dir
So the end result from the above should for example display:
emcpowera sdbd sddg sdfj sdhm emcpowera1 /dwpdb006
emcpoweraa sdae sdch sdek sdgn emcpoweraa1 /dwpdb033
emcpowerbc sdb sdbe sddh sdfk emcpowerbc1 /s00_11
sdba sddd sdfg sdhj emcpowerbc2 /utl_file_dir
^^^^^^^^^^^^^^^^^^^
Why is this list
emcpowerc sdbb sdde sdfh sdhk emcpowerc1 /odsdb006
emcpowerd sdba sddd sdfg sdhj emcpowerd1 /odsdb005
^^^^^^^^^^^^^^^^^^^
the same as this list?
emcpowerz sdbg sddv sdfd sdht
John
--
Any intelligent fool can make things bigger and
more complex... It takes a touch of genius -
and a lot of courage to move in the opposite
direction. -- Albert Einstein
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
http://learn.perl.org/