Hamilton LaboratoriesHamilton C shell 2012User guideExternal utilities


Oregon Coast

Previous | Next

        XOR Files to Stdout

Usage:  xor [-qh-] file1 [ file2 ]

   xor performs a bytewise exclusive-OR of the contents of two files,
   thus performing a one-time pad, writing the result to stdout.  If
   only one file is specified, the second file is read from stdin.

   If the two files differ in length, the output is truncated to the
   length of the shorter file.  When it truncates, xor writes an error
   message and exits with a status code reflecting the end-of-file
   condition unless -q is specified.


   -q         Quiet.  It's not an error if the input files have
              differing lengths.  xor will truncate silently.
   -h         Help.  (This screen.)
   --         End of options.

Previous | Next