D
dbone
I don't even know where to start with this one. I have several files
that I need to merge into a master file. Both files have the same
syntax but I need to merge the second within the master in the correct
place. This is tricky because the second file may need to be merged
several bracket levels deep. The example below has it merged at one
level deep.
In the example below the master might look like:
-------------- <snip> -----------
cmd configure pvc "Enable SNMP atm pvc traps"
{
attr alsoCR
cmd configure interval "minimum period between successive traps"
{
cmd configure <1-3600> "minimum period between successive traps
(in seconds)"
{
attr alsoCR
cmd configure fail-interval "minimum period for storing the
failed timestamp"
{
cmd configure <0-3600> "minimum period for storing the
failed timestamp (in seconds)"
}
}
}
}
-------------- <snip> -----------
The file to be merged might look like:
-------------- <snip> -----------
cmd configure fail-interval "minimum period for storing the failed
timestamp"
{
cmd configure <0-3600> "minimum period for storing the failed
timestamp (in seconds)"
}
-------------- <snip> -----------
The idea is to merge the two for the result below.
-------------- <snip> -----------
cmd configure pvc "Enable SNMP atm pvc traps"
{
attr alsoCR
cmd configure fail-interval "minimum period for storing the failed
timestamp"
{
cmd configure <0-3600> "minimum period for storing the failed
timestamp (in seconds)"
}
cmd configure interval "minimum period between successive traps"
{
cmd configure <1-3600> "minimum period between successive traps
(in seconds)"
{
attr alsoCR
cmd configure fail-interval "minimum period for storing the
failed timestamp"
{
cmd configure <0-3600> "minimum period for storing the
failed timestamp (in seconds)"
}
}
}
}
-------------- <snip> -----------
Please help me get this one figured out.
thanks,
dave
that I need to merge into a master file. Both files have the same
syntax but I need to merge the second within the master in the correct
place. This is tricky because the second file may need to be merged
several bracket levels deep. The example below has it merged at one
level deep.
In the example below the master might look like:
-------------- <snip> -----------
cmd configure pvc "Enable SNMP atm pvc traps"
{
attr alsoCR
cmd configure interval "minimum period between successive traps"
{
cmd configure <1-3600> "minimum period between successive traps
(in seconds)"
{
attr alsoCR
cmd configure fail-interval "minimum period for storing the
failed timestamp"
{
cmd configure <0-3600> "minimum period for storing the
failed timestamp (in seconds)"
}
}
}
}
-------------- <snip> -----------
The file to be merged might look like:
-------------- <snip> -----------
cmd configure fail-interval "minimum period for storing the failed
timestamp"
{
cmd configure <0-3600> "minimum period for storing the failed
timestamp (in seconds)"
}
-------------- <snip> -----------
The idea is to merge the two for the result below.
-------------- <snip> -----------
cmd configure pvc "Enable SNMP atm pvc traps"
{
attr alsoCR
cmd configure fail-interval "minimum period for storing the failed
timestamp"
{
cmd configure <0-3600> "minimum period for storing the failed
timestamp (in seconds)"
}
cmd configure interval "minimum period between successive traps"
{
cmd configure <1-3600> "minimum period between successive traps
(in seconds)"
{
attr alsoCR
cmd configure fail-interval "minimum period for storing the
failed timestamp"
{
cmd configure <0-3600> "minimum period for storing the
failed timestamp (in seconds)"
}
}
}
}
-------------- <snip> -----------
Please help me get this one figured out.
thanks,
dave