gocat

command module
v2.0.0+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 27, 2019 License: MIT Imports: 15 Imported by: 0

README

CircleCI Go Report Card GoDoc license

gocat

Description

gocat is a super simple command line program for concatenating files. gocat supports the following operating systems and architectures.

GOOS GOARCH
darwin amd64
linux amd64
windows amd64
linux arm64

Installation

No installation is required. Just grab a release. You might want to rename your binary to just gocat (or cat) for convenience.

If you do have go already installed, you can just run using go run main.go or install with make install

Usage

See the usage below or the following examples.

gocat is a super simple utility to concatenate files (local, remote, or on AWS S3) provided as positional arguments.  Supports stdin (aka "-"), local files (path/to/file or file://path/to/file), remote files (http://path/to/file), or files on AWS S3 (s3://path/to/file).

Usage:
  gocat [flags] [-|stdin|FILE|URI]...

Flags:
  -a, --append-new-lines               append new lines to files
      --aws-access-key-id string       AWS Access Key ID
      --aws-default-region string      AWS Default Region
      --aws-profile string             AWS Profile
      --aws-region string              AWS Region (overrides default region)
      --aws-secret-access-key string   AWS Secret Access Key
      --aws-session-token string       AWS Session Token
  -b, --buffer-size int                buffer size for file reader (default 4096)
  -h, --help                           help for gocat

Examples

Shell

gocat "~/.bash_aliases" "~/.bashrc"

Remote File

gocat arguments can point to remote files

gocat https://spatialcurrent.io

All Files With Extension

gocat will print every file given as a positional argument, which can be useful when looking through thousands of files.

gocat $( find . -print | grep -i '.*[.]md')

Building

You can build all the released artifacts using make build or run the make target for a specific operating system and architecture.

Testing

Run test using bash scripts/test.sh or make test, which runs unit tests, go vet, go vet with shadow, errcheck, ineffassign, staticcheck, and misspell.

Contributing

Spatial Current, Inc. is currently accepting pull requests for this repository. We'd love to have your contributions! Please see Contributing.md for how to get started.

License

This work is distributed under the MIT License. See LICENSE file.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL