Hi,
Im trying to script the following logic but having some difficulties and wonder if you can help. Have tried to use "cut" to cut pairs but doesn't appear to do what i need when there are more than one pair. Also "wc -c" doesn't appear to be so easy to know which characters to strip of at
I have a confile file as follows
#Client|NAME|Username|No_of_Expected_Connections|Instances|Partitioned
JAY|TEST|[JAY]|2|01 02|N|
JAY|TEST2|[JAY]|4|01 02 03 04|Y|
JAY|TEST2|[JAY]|4|01 02 03 04 05 06 07 08|Y|
The logic i want to apply is:
"Check the value for 'Partitioned' in config file. If its Y then get the value of 'Instances' column and pair them up. So if we have following instances "01 02 03 04 05 06" i want to pair "01 02" and "03 04" and "05 06" and do same for the remaining instances
Idea then is that we have log files which would be named based on the above instances. so for pairs "01 02", there would be two log files
logfile01.txt and logfile02.txt
logfile03.txt and logfile04.txt etc"
Please can you help/advice how best to pair these up?
Many Thanks