ISO27001:2013 Certified Supplier

How Seriously Do We Take Information Security?

We’re an IT company: you’d expect us to say that we take information security seriously – and we do.

But We Would Say That, Wouldn’t We?

We don’t think you should have to take our word for it, so back in 2014 we embarked upon the journey to certification under ISO27001:2013, the Information Security standard. We examined, refined, documented and tested every aspect of Information Security, both within Tiger Computing and extending to how we manage and support our clients’ systems. In May 2015, we put ourselves to the test. We were independently audited and were assessed and certified as meeting the requirements of ISO27001:2013.

What Does This Mean For You?

It means that you can rest assured that we take Information Security seriously; that we will continue to refine and improve our Information Security policies; and that we will be independently audited annually to confirm that we are maintaining the required high standards of ISO27001:2013.

What’s Next?

We will continue to grow our support, management and monitoring infrastructure to ensure that our clients have the very best availability of your systems – and we’ll continue building our team of the best Linux experts in the UK.

NEWS & BLOG

Linux Tips: Comm

The comm command can be used to compare two files line by line. It’s particularly useful when writing shell scripts. Take for example the following two files:

Shell

1

2

3

4

5

6

7

8

9

$catfile1

a

b

c

$catfile2

b

c

d

e

You can quickly see which lines are common to the two files and which are present in only one:

Shell

1

2

3

4

5

6

$commfile1 file2

a

b

c

d

e

The first column lists the lines present only in the first file, the second column those present only in the second file, and the third shows the lines that are identical in both files.

Keeping Things In Order

Before we delve further it’s important to note that one of comm‘s restrictions is that the input files must be sorted. That is easily rectified using sort (without any extra options). For example:

Shell

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

$# First, randomise file2 and save as file3:

$shuf file2|teefile3

d

e

b

c

$commfile1 file3

a

b

c

d

e

comm:file2isnotinsorted order

b

c

$# Now sort file3 before using it:

$commfile1<(sortfile3)

a

b

c

d

e

When the input files are not sorted the output of comm is not defined and it will exit with an error.

Using comm In Scripts

The columns output by comm are delimited by single TAB characters, so scripts can reasonably easily parse comm‘s output to glean the information they need. Sometimes you only need what’s in one of the columns, though, and nobody wants to reach for cut or even awk without good cause. Thankfully comm can be told to omit columns from its output entirely.

To display only the lines unique to file1, use -23 to exclude the second and third columns:

Shell

1

2

$comm-23file1 file2

a

To display only the lines unique to file2, exclude the first and third columns:

Shell

1

2

3

$comm-13file1 file2

d

e

And finally, to display only the lines common to both files, include only the third column:

Shell

1

2

3

$comm-12file1 file2

b

c

comm is part of GNU coreutils and should be available out of the box on most Linux systems. More options are available, such as --total to calculate a summary of the number of lines in each column, or --zero-terminated (-z) which is useful when dealing with file names that can contain spaces (together with find -print0 and xargs -0 for example); be sure to check the comm(1) man page as well as the online documentation to get the full picture.