I need help putting the output of a command into a hash of hashes. The problem is that each "Name" in the output is different but contained in that name out their could be multiple "keys" for the value I am trying to capture
I want to capture the "Name" and the unique 1st key identifier, and then each of the following key and value pair (CloneCount, CloneCount,CloneState,IsDirty, PercentSynced) As you can see from below some names have multiple cloneID and values associated with that cloneID
Here is the output its just a sample of the output:
Name: LUN 120 DB
CloneGroupUid: 50:06:01:60:BC:E0:26:09:03:00:00:00:00:00:00:00
InSync: Yes
Description:
QuiesceThreshold: 60
SourceMediaFailure: No
IsControllingSP: Yes
SourceLUNSize: 587202560
CloneCount: 3
Sources: 120
Clones:
CloneID: 0100000000000000
CloneState: Consistent
CloneCondition: Administratively Fractured
AvailableForIO: Yes
CloneMediaFailure: No
IsDirty: No
PercentSynced: N/A
RecoveryPolicy: Auto
SyncRate: High
CloneLUNs: 200
UseProtectedRestore: No
IsFractured: Yes
CloneID: 0300000000000000
CloneState: Consistent
CloneCondition: Normal
AvailableForIO: No
CloneMediaFailure: No
IsDirty: No
PercentSynced: N/A
RecoveryPolicy: Auto
SyncRate: Medium
CloneLUNs: 202
UseProtectedRestore: No
IsFractured: No
CloneID: 0200000000000000
CloneState: Consistent
CloneCondition: Administratively Fractured
AvailableForIO: Yes
CloneMediaFailure: No
IsDirty: No
PercentSynced: N/A
RecoveryPolicy: Auto
SyncRate: High
CloneLUNs: 201
UseProtectedRestore: No
IsFractured: Yes
Name: LUN 110 audit trail
CloneGroupUid: 50:06:01:60:BC:E0:26:09:08:00:00:00:00:00:00:00
InSync: Yes
Description:
QuiesceThreshold: 60
SourceMediaFailure: No
IsControllingSP: Yes
SourceLUNSize: 629145600
CloneCount: 1
Sources: 110
Clones:
CloneID: 0100000000000000
CloneState: Consistent
CloneCondition: Administratively Fractured
AvailableForIO: Yes
CloneMediaFailure: No
IsDirty: No
PercentSynced: N/A
RecoveryPolicy: Auto
SyncRate: High
CloneLUNs: 213
UseProtectedRestore: No
IsFractured: Yes
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|