Skip to main content

UNIX cat with read support for S3, SSH, etc.

Project description


A wrapper around the standard cat utility that can read from:

  • HTTP and HTTPS
  • S3
  • SSH
  • HDFS and WebHDFS


$ echo THIS | cat - s3://silo-open-data/README -b | grep -i th.s
     1  THIS
    40      <p>This domain is for use in illustrative examples in documents. You may use this
    52  These data are hosted under the AWS Public Data program, courtesy of Amazon Web Services Inc.


The standard cat utility is very useful for writing command pipelines. Unfortunately, it only reads from the local file system.

We frequently need to access files from a variety of sources. The command syntax to achieve this differs for each source. For example:

cat /some/local/file
aws s3 cp s3://bucket/key.txt -
ssh host cat /path/to/file

This is inconvenient. Wouldn't it be better if you could use a single command to do all these things?

Now you can.

anycat /some/local/file
anycat s3://bucket/key.txt -
anycat host cat /path/to/file


To install:

pip install -U anycat

and anycat from your shell.

You can save yourself some typing and make a bash alias:

alias cat=anycat

If you suspect something is broken, you can temporarily revert to the actual cat binary by prefixing with a backslash:

\cat /path/to/file

or remove the alias completely:

unalias cat

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for anycat, version 0.0.1
Filename, size File type Python version Upload date Hashes
Filename, size anycat-0.0.1.tar.gz (3.7 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page