Flags 1, 2, or 3 suppress printing of the corresponding column. Thus comm -12 prints only the lines common to the two files; comm -23 prints only lines in the first file but not in the second; comm -123 prints nothing.
The lines are compared using the current locale's collation sequence, set by the environment variable LC_COLLATE. (See LANG in environ(5) for the locale environment variables, and their effects on collation.) Note that if the files were sorted with a different collation sequence from each other, or from that under which comm is executed, the results will be meaningless.
The LC_CTYPE environment variable determines the codesets used in the command line arguments and the files. (See LANG on environ(5)). Note that if this variable differs when the files are sorted, or when comm is executed, the output of comm will be meaningless. Note also, that if LC_CTYPE and LC_COLLATE are set to different values, meaningful results cannot be guaranteed.