dog

dog (better than cat) is a re-implementation 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.
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, http, and zip types. It is designed
as a compatible, but enhanced, replacement of cat(1).
Documentation:
- Installing dog
Install dog by copying "dog" into a directory somewhere
on your PATH. You must also have PHP-CLI installed.
Copy the man page to your man directory, usually
/usr/local/share/man/man1
- Running dog
Enter: dog --help at your command-line for brief help
using dog, or for more detailed help, man dog
dog [optoons] file|URL file|URL ...
Example usage: dog https://google.com
- Command options for dog
[-h|--help] (show help, exit)
[-V|--version] (show version number, exit)
[-] (read input from STDIN)
[-f|--format html/text/json/yaml/xml] (set Accept header
appropriately)
[-U|--user username] (sets Authorization header appropriately)
[-P|--password password] (sets Authorization header
appropriately)
[-w|--width cols] (print first 'cols' characters of each line)
[-A|--show-all] (show tabs (-T), control characters (-v), and
line endings (-E))
[-B|--no-blanks] (only print lines with non-whitespace
characters)
[-E|--show-ends] (display a '$' at the end of each line)
[-t] (display TAB characters (-T) and control characters (-v))
[-T|--show-tabs] (display TAB characters as '^I')
[-s|--squeeze-blank] (never print more than one single blank
line)
[-n|--number] (precede each line with its line number)
[-b|--number-non-blank] (precede each non-blank line with its
line number)
[-v|--show-nonprinting] (display control characters except for
LFD and TAB using '^' notation)
[-e] (display line endings (-E) and control characters (-v))
[-u] (ignored, for compatibility with cat)
[--hide-nonprinting] (do not display control characters except
for LFD and TAB)
[--no-header] (does not show HTTP headers for URLs)
[--show-all] (equivalent to --show-ends and --show-tabs)
[--upper] (convert all lower-case characters to upper)
[--lower] (convert all upper-case characters to lower)
[--links] (treats input as HTML and lists unique, absolute URL
links from input data.)
[--images] (treats input as HTML and lists unique, absolute image
links from input data.)
[--hex] (dump the input data as a hex dump, other formatting
flags will not apply)
Support:
You can ask for help
with dog on the mailing list.
License, Documentation:
View the current: README • License
(GPL)
- v1.7.1 November 30, 2015
- v2.2.3 March 9, 2025
Requirements, Download(s):
Requires PHP-CLI 7.4 or greater. It needs to have PCRE
compiled in or loaded as an extension. Virtually all PHP
installations meet this requirement.
Mailing List
Mailing list | Archives
Home