DS Toolkit
Merge Lists

Help

Help

Overview

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

10.10.0.1
10.10.0.50
10.20.0.100
10.20.0.101
10.30.0.10

and the second one contains a few hostnames

NYC-BRAS1
NYC-DHCP1
LA-NS1
LA-NS2
SEA-RADIUS1

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

10.10.0.1 NYC-BRAS1
10.10.0.50 NYC-DHCP1
10.20.0.100 LA-NS1
10.20.0.101 LA-NS2
10.30.0.10 SEA-RADIUS1

Main interface

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.

Settings

There are several elements on the settings panel to customize result of list concatenation.

First input list delimiter

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-BRAS1 , NYC-DHCP1 , LA-NS1 , LA-NS2 , SEA-RADIUS1

has comma (,) as a delimiter.

Let's look at another example

NYC-BRAS1 , NYC-DHCP1 ; LA-NS1 , LA-NS2 ; SEA-RADIUS1

In 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.

Second input list delimiter

It's the same as First input list delimiter but for second input list.

Binder

In the Overview the result of merging two lists (IP addresses and hostnames) was

10.10.0.1 NYC-BRAS1
10.10.0.50 NYC-DHCP1
10.20.0.100 LA-NS1
10.20.0.101 LA-NS2
10.30.0.10 SEA-RADIUS1

But if we just simply concatenate these two lists element-wise, result should be like this

10.10.0.1NYC-BRAS1
10.10.0.50NYC-DHCP1
10.20.0.100LA-NS1
10.20.0.101LA-NS2
10.30.0.10SEA-RADIUS1

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.


Back to main page →

Back to top →