EnglishFrenchSpanish

Ad


OnWorks favicon

commposix - Online in the Cloud

Run commposix in OnWorks free hosting provider over Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

This is the command commposix that can be run in the OnWorks free hosting provider using one of our multiple free online workstations such as Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

PROGRAM:

NAME


comm — select or reject lines common to two files

SYNOPSIS


comm [−123] file1 file2

DESCRIPTION


The comm utility shall read file1 and file2, which should be ordered in the current
collating sequence, and produce three text columns as output: lines only in file1, lines
only in file2, and lines in both files.

If the lines in both files are not ordered according to the collating sequence of the
current locale, the results are unspecified.

OPTIONS


The comm utility shall conform to the Base Definitions volume of POSIX.1‐2008, Section
12.2, Utility Syntax Guidelines.

The following options shall be supported:

−1 Suppress the output column of lines unique to file1.

−2 Suppress the output column of lines unique to file2.

−3 Suppress the output column of lines duplicated in file1 and file2.

OPERANDS


The following operands shall be supported:

file1 A pathname of the first file to be compared. If file1 is '−', the standard input
shall be used.

file2 A pathname of the second file to be compared. If file2 is '−', the standard
input shall be used.

If both file1 and file2 refer to standard input or to the same FIFO special, block
special, or character special file, the results are undefined.

STDIN


The standard input shall be used only if one of the file1 or file2 operands refers to
standard input. See the INPUT FILES section.

INPUT FILES


The input files shall be text files.

ENVIRONMENT VARIABLES


The following environment variables shall affect the execution of comm:

LANG Provide a default value for the internationalization variables that are unset or
null. (See the Base Definitions volume of POSIX.1‐2008, Section 8.2,
Internationalization Variables for the precedence of internationalization
variables used to determine the values of locale categories.)

LC_ALL If set to a non-empty string value, override the values of all the other
internationalization variables.

LC_COLLATE
Determine the locale for the collating sequence comm expects to have been used
when the input files were sorted.

LC_CTYPE Determine the locale for the interpretation of sequences of bytes of text data
as characters (for example, single-byte as opposed to multi-byte characters in
arguments and input files).

LC_MESSAGES
Determine the locale that should be used to affect the format and contents of
diagnostic messages written to standard error.

NLSPATH Determine the location of message catalogs for the processing of LC_MESSAGES.

ASYNCHRONOUS EVENTS


Default.

STDOUT


The comm utility shall produce output depending on the options selected. If the −1, −2,
and −3 options are all selected, comm shall write nothing to standard output.

If the −1 option is not selected, lines contained only in file1 shall be written using the
format:

"%s\n", <line in file1>

If the −2 option is not selected, lines contained only in file2 are written using the
format:

"%s%s\n", <lead>, <line in file2>

where the string <lead> is as follows:

<tab> The −1 option is not selected.

null string
The −1 option is selected.

If the −3 option is not selected, lines contained in both files shall be written using the
format:

"%s%s\n", <lead>, <line in both>

where the string <lead> is as follows:

<tab><tab>
Neither the −1 nor the −2 option is selected.

<tab> Exactly one of the −1 and −2 options is selected.

null string
Both the −1 and −2 options are selected.

If the input files were ordered according to the collating sequence of the current locale,
the lines written shall be in the collating sequence of the original lines.

STDERR


The standard error shall be used only for diagnostic messages.

OUTPUT FILES


None.

EXTENDED DESCRIPTION


None.

EXIT STATUS


The following exit values shall be returned:

0 All input files were successfully output as specified.

>0 An error occurred.

CONSEQUENCES OF ERRORS


Default.

The following sections are informative.

APPLICATION USAGE


If the input files are not properly presorted, the output of comm might not be useful.

EXAMPLES


If a file named xcu contains a sorted list of the utilities in this volume of
POSIX.1‐2008, a file named xpg3 contains a sorted list of the utilities specified in the
X/Open Portability Guide, Issue 3, and a file named svid89 contains a sorted list of the
utilities in the System V Interface Definition Third Edition:

comm −23 xcu xpg3 | comm −23 svid89

would print a list of utilities in this volume of POSIX.1‐2008 not specified by either of
the other documents:

comm −12 xcu xpg3 | comm −12 svid89

would print a list of utilities specified by all three documents, and:

comm −12 xpg3 svid89 | comm −23 xcu

would print a list of utilities specified by both XPG3 and the SVID, but not specified in
this volume of POSIX.1‐2008.

RATIONALE


None.

FUTURE DIRECTIONS


None.

Use commposix online using onworks.net services


Free Servers & Workstations

Download Windows & Linux apps

  • 1
    OrangeFox
    OrangeFox
    Fork of TeamWinRecoveryProject(TWRP)
    with many additional functions, redesign
    and more Features:Supports Treble and
    non-Treble ROMsUp-to-date Oreo kernel,
    built...
    Download OrangeFox
  • 2
    itop - ITSM  CMDB OpenSource
    itop - ITSM CMDB OpenSource
    IT Operations Portal: a complete open
    source, ITIL, web based service
    management tool including a fully
    customizable CMDB, a helpdesk system and
    a document man...
    Download itop - ITSM CMDB OpenSource
  • 3
    Clementine
    Clementine
    Clementine is a multi-platform music
    player and library organizer inspired by
    Amarok 1.4. It has a fast and
    easy-to-use interface, and allows you to
    search and ...
    Download Clementine
  • 4
    XISMuS
    XISMuS
    ATTENTION: Cumulative update 2.4.3 has
    been released!! The update works for any
    previous 2.x.x version. If upgrading
    from version v1.x.x, please download and
    i...
    Download XISMuS
  • 5
    facetracknoir
    facetracknoir
    Modular headtracking program that
    supports multiple face-trackers, filters
    and game-protocols. Among the trackers
    are the SM FaceAPI, AIC Inertial Head
    Tracker ...
    Download facetracknoir
  • 6
    PHP QR Code
    PHP QR Code
    PHP QR Code is open source (LGPL)
    library for generating QR Code,
    2-dimensional barcode. Based on
    libqrencode C library, provides API for
    creating QR Code barc...
    Download PHP QR Code
  • 7
    Cuckoo Sandbox
    Cuckoo Sandbox
    Cuckoo Sandbox uses components to
    monitor the behavior of malware in a
    Sandbox environment; isolated from the
    rest of the system. It offers automated
    analysis o...
    Download Cuckoo Sandbox
  • More »

Linux commands

  • 1
    acl_gran
    acl_gran
    rsbac-admin - Rule Set Based Access
    Control DESCRIPTION: rsbac-admin is a
    set of tool used to manage systems using
    a Rule Set Based Access Control (RSBAC)
    kern...
    Run acl_gran
  • 2
    acl_grant
    acl_grant
    rsbac-admin - Rule Set Based Access
    Control DESCRIPTION: rsbac-admin is a
    set of tool used to manage systems using
    a Rule Set Based Access Control (RSBAC)
    kern...
    Run acl_grant
  • 3
    cpupower-idle-set
    cpupower-idle-set
    cpupower idle-set - Utility to set cpu
    idle state specific kernel options
    SYNTAX: cpupower [ -c cpulist ]
    idle-info [options] DESCRIPTION: The
    cpupower idle-se...
    Run cpupower-idle-set
  • 4
    cpupower-info
    cpupower-info
    cpupower-info - Shows processor power
    related kernel or hardware
    configurations ...
    Run cpupower-info
  • 5
    g15daemon
    g15daemon
    g15daemon - provides access to extra
    keys and the LCD available on the
    logitech G15 keyboard. DESCRIPTION:
    G15Daemon allows users access to all
    extra keys by d...
    Run g15daemon
  • 6
    g15ladi
    g15ladi
    laditools - tools to control and
    monitor LADI (JACK and ladish) systems ...
    Run g15ladi
  • More »

Ad