Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can this even be done?

Status
Not open for further replies.

cryptoadm

MIS
Nov 6, 2008
71
US
type1:host5:2.6.5-7.282-smp:4:xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx VERITAS Storage Foundation Enterprise HA : xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx VERITAS File System
type1:host1:2.6.5-7.282-smp:4:xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx VERITAS Storage Foundation Enterprise HA xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx VERITAS Storage Foundation for Oracle
type1:host6:2.6.5-7.282-smp:4:xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx VERITAS Storage Foundation Enterprise
type1:host2:2.6.5-7.282-smp:4:xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx VERITAS Storage Foundation Enterprise HA xxxx-xxxx-xxxx-xxxxx-xxxx-xxxx-xxxx VERITAS Storage Foundation for Oracle
type2:host3:5.10:1:xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx VERITAS Storage Foundation Basic : xxx-xxxx-xxxx-xxxx-xxxx-xxxx-x VERITAS File System xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-x VERITAS File System xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-x VERITAS File System
type2:host4:5.10:1:xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxx VERITAS Storage Foundation Basic : xxx-xxxx-xxxx-xxxx-xxxx-xxxx-x VERITAS File System xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-x VERITAS File System
type1:host6:2.6.5-7.282-smp:4:xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx VERITAS File System

During my matches I was able to print a : between the "key VStorF : key VFSys" but if there are multiple Storage Foundation, say HA and Basic for the same system then it prints "key VSF key VSF".

What I want is a : between every key and Vertias Storage Foundation or Vertias File System or however they are.

So the ending result would look like this:

type1:host5:2.6.5-7.282-smp:4:xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx VERITAS Storage Foundation Enterprise HA : xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx VERITAS File System
type1:host1:2.6.5-7.282-smp:4:xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx VERITAS Storage Foundation Enterprise HA : xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx VERITAS Storage Foundation for Oracle
type1:host6:2.6.5-7.282-smp:4:xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx VERITAS Storage Foundation Enterprise
type1:host2:2.6.5-7.282-smp:4:xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx VERITAS Storage Foundation Enterprise HA : xxxx-xxxx-xxxx-xxxxx-xxxx-xxxx-xxxx VERITAS Storage Foundation for Oracle
type2:host3:5.10:1:xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx VERITAS Storage Foundation Basic : xxx-xxxx-xxxx-xxxx-xxxx-xxxx-x VERITAS File System : xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-x VERITAS File System : xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-x VERITAS File System
type2:host4:5.10:1:xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxx VERITAS Storage Foundation Basic : xxx-xxxx-xxxx-xxxx-xxxx-xxxx-x VERITAS File System : xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-x VERITAS File System
type1:host6:2.6.5-7.282-smp:4:xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx VERITAS File System

 


We don't know what you are talking about, the only difference between the original file and the result file are some colons {:}:
Code:
$ diff file1 file2
2,3c2,3
< type1:host1:2.6.5-7.282-smp:4:xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx VERITAS Storage Foundation Enterprise HA xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx VERITAS Storage Foundation for Oracle
< type1:host2:2.6.5-7.282-smp:4:xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx VERITAS Storage Foundation Enterprise HA xxxx-xxxx-xxxx-xxxxx-xxxx-xxxx-xxxx VERITAS Storage Foundation for Oracle
---
> type1:host1:2.6.5-7.282-smp:4:xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx VERITAS Storage Foundation Enterprise HA [red]:[/red] xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx VERITAS Storage Foundation for Oracle
> type1:host2:2.6.5-7.282-smp:4:xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx VERITAS Storage Foundation Enterprise HA [red]:[/red] xxxx-xxxx-xxxx-xxxxx-xxxx-xxxx-xxxx VERITAS Storage Foundation for Oracle
7,8c7,8
< type2:host3:5.10:1:xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx VERITAS Storage Foundation Basic : xxx-xxxx-xxxx-xxxx-xxxx-xxxx-x VERITAS File System xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-x VERITAS File System xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-x VERITAS File System
< type2:host4:5.10:1:xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxx VERITAS Storage Foundation Basic : xxx-xxxx-xxxx-xxxx-xxxx-xxxx-x VERITAS File System xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-x VERITAS File System
---
> type2:host3:5.10:1:xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx VERITAS Storage Foundation Basic : xxx-xxxx-xxxx-xxxx-xxxx-xxxx-x VERITAS File System [red]:[/red] xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-x VERITAS File System : xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-x VERITAS File System
> type2:host4:5.10:1:xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxx VERITAS Storage Foundation Basic : xxx-xxxx-xxxx-xxxx-xxxx-xxxx-x VERITAS File System [red]:[/red] xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-x VERITAS File System
Maybe you need to think again what are your requirements.
[3eyes]


----------------------------------------------------------------------------
The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb
 
I think I understand your requirement alright... but where is the broken code that you want us to help you fix?

Annihilannic.
 

Aaaaah, yes too much clutter that I missed that ":" was the actual requirement.
[morning]



----------------------------------------------------------------------------
The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top