guncat(1)

guncat - unencrypting file concatenation
(guncat_2.01.00)

2014-2022

NAME

guncat - catenates files, unencrypting pgp encrypted sections

SYNOPSIS

guncat [OPTIONS] [file(s)]
[OPTIONS] - cf. section OPTIONS
[file(s)] - optional files to process (cf. section INPUT FILE(S))

DESCRIPTION

Guncat was designed to tackle a problem encountered with (partially) PGP encrypted files (which may exist in, e.g., mailboxes). Tools to process text-files (like grep(1), or less(1)) may be used to process those files, but those tools leave PGP encrypted sections inside such files as-is. As a consequence, browsing the `real' contents (i.e., clear-text sections and the unencrypted content of PGP encrypted sections) of those files is difficult.

Guncat acts comparably to cat, but unencrypts encrypted sections encountered in the files processed by guncat, copying the unencrypted information to guncat's standard output stream, which may thereupon be processed by other tools.

PGP/GPG encrypted sections are surrounded by the following markers:


-----BEGIN PGP MESSAGE-----

and

-----END PGP MESSAGE-----

When guncat encounters such sections they are processed by gpg(1). Gpg needs a passphrase to unencrypt such sections. If not already available (from gpg-agent(1)) the required passphrase is requested by guncat, whereafter it is used by gpg.

When an incorrect passphrase is entered two additional attempts to provide the correct passphrase are allowed. If the third attempt also fails, guncat terminates. While processing files guncat may have to reposition their current file pointer locations. If repositioning is not supported guncat terminated with an error message.

RETURN VALUE

Guncat returns 0 to the operating system unless an error occurs (0 is also returned when information providing option (like --version or --gpg-command) are specified). 1 is returned if gpg could not decrypt an encrypted section or when called without options or s to process.

INPUT FILE(S)

When no file arguments are provided input may be provided using standard input stream redirection.

When option --passphrase is specified the content of the first line of a specified file is used as the passphrase (see option --passphrase below.

Any other argument is considered a filename (path specifications are allowed) specifying a file to be processed (in sequence) by guncat.

If a file cannot be read or decrypted guncat terminates with an error message.

OPTIONS

In the following overview of options single letter options, when available, are listed between parentheses following their associated long-option alternatives. Single letter options require arguments if their long option alternatives require arguments as well.

SEE ALSO

gpg(1), gpg-agent(1), grep(1), less(1).

BUGS

None reported

COPYRIGHT

This is free software, distributed under the terms of the `GNU General Public License'. Guncat is available at https://fbb-git.gitlab.io/guncat/

AUTHOR

Frank B. Brokken (f.b.brokken@rug.nl).