DOG(1) Linux User Manuals DOG(1)

dog - better than cat

dog [-V|--version] [-h|--help] [-] [-f|--format html/text/json/yaml/xml] [-U|--user username] [-P|--password password] [-w|--width cols] [-A|--show-all] [-B|--no-blanks] [-E|--show-ends] [-t] [-T|--show-tabs] [-s|--squeeze-blank] [-n|--number] [-b|--number-non-blank] [-v|--show-nonprinting] [-e] [-u] [-g|--user-agent] user-agent [-H|--header] header [--hide-nonprinting] [--no-header] [--show-all] [--upper] [--lower] [--links] [--images] [--hex] file | URL | - ...

dog is a reimplementation of dog by Jason Cohen and Jacob Leverich, because theirs has gone defunct and does not support HTTPS. dog writes the contents of each given file, URL, or the standard input if none are given or when a file named '-' is given, to the standard output. It currently supports the file, and http(s) types. It is designed as a compatible, but enhanced, replacement of cat(1). This version of dog does not support all the options of the original dog implementation, but likely supports most of the options anyone used.

-V, --version

Shows dog version on standard output and exits.

-h, --help

Shows brief help and exits.

- read input from STDIN

-f, --format html/text/json/yaml/xml

(HTTP-only) Sends an "Accept" header appropriate to receive content in the specified format. The sender must support the requested format.

-A, --show-all

Display TAB characters as '^I', and displays a '$' at the end of each line.

-b, --number-nonblank

Number all nonblank output lines, starting with 1.

-e Equivalent to -vE

Display control characters except for LFD and TAB using '^' notation, and display a '$' at the end of each line.

-E, --show-ends

Display a '$' at the end of each line.

-n, --number

Number all output lines, starting with 1.

-s, --squeeze-blank

Replace multiple adjacent blank lines with a single blank line.

-t Equivalent to -vT

Display TAB characters (-T) and control characters using '^' notation.

-T, --show-tabs

Display TAB characters as '^I'.

-u

Ignored; for Unix compatibility.

-w[n]

Print first n characters of each line. (default=80)

-v, --show-nonprinting

Display control characters except for LFD and TAB using '^' notation.

-g, --user-agent

Send specified User-Agent (ie: dog/1.0.0).

-H, --header

Sends specified header. Argument may be given more than once.

--hide-nonprinting

Strip nonprinting characters when printing to output.

-B, --no-blanks

Only print lines that contain at least one non-whitespace character.

--no-header

Do not display header on HTTP data.

--images

Treats input as HTML and lists unique, absolute image links from input data.

--links

Treats input as HTML and lists unique, absolute URL links from input data.

--upper

Convert all lower-case characters to upper-case.

--lower

Convert all upper-case characters to lower-case.

This version of dog supports reading from STDIN via - , pathnames, and URLs. URLS should start with http://user:pass@URI , https://user:pass@URI , ftp://user:pass@filepath , ssh2.sftp://user:pass@example.com/filepath , ftps://user:password@example.com/filepath , zip://filepath

If specified, user (-U) and password (-P) will be sent to all given URLs.

Note that dog may not be adequate for diagnosing Web server output, as line endings are stripped from headers before dog displays them.

cat(1), concatenate files and print on the standard output

Ron Guerin <ron@vnetworx.net>
dog can be found at https://gothamcode.com/dog and bugs/patches can be submitted by email.

2025-07-19 July 2025