Sometimes there is a need to merge a couple of lists. For example, let's pretend we want to update our host file, and we have two lists to do this.
The first one is a list of IP addresses
and the second one contains a few hostnames
Each line of a typical host file is usually a combination of IP address and one or more hostnames, separated by whitespace characters. Using this tool, we can easily join our lists item by item and obtain the data to update our host file
There are two boxes for lists you want to merge. The boxes separated by a button with a plus on it. To start merging, just click this button. Note that lists always combine element-wise.
There is also a box for concatenation results. You can't directly edit the content of this one.
There are several elements on the settings panel to customize result of list concatenation.
A list is basically a set of items separated by one or more characters like commas, dots, colons, etc., including special characters such as \n
(line feed), \r
(carriage return), and \t
(horizontal tab). There is a need to set the right delimiter in order to specify an input list.
For example, this list
,
NYC-DHCP1 ,
LA-NS1 ,
LA-NS2 ,
SEA-RADIUS1has comma (,
) as a delimiter.
Let's look at another example
,
NYC-DHCP1 ;
LA-NS1 ,
LA-NS2 ;
SEA-RADIUS1In this case, delimiter could be comma or semicolon. It's up to you to decide which character to use.
If the element is disabled (when the checkbox on the left is unchecked), then the delimiter will be recognized automatically. In most cases, there is no need to set some delimiters manually.
It's the same as First input list delimiter but for second input list.
In the Overview the result of merging two lists (IP addresses and hostnames) was
But if we just simply concatenate these two lists element-wise, result should be like this
Note that there is no space character between IP address and hostname in any line. In order to add such character, just fill this field in. Of course, it can be any other character (not only space) or even a set of characters.