cat-for-windows

A port of the popular 'cat' utility used to concatenate file(s) to standard output in Go compiled as a Windows executable.

Stars
5

cat-for-windows

A Go port of the popular 'cat' utility used to concatenate file(s) to standard output. It can be compiled for most modern operating systems, but this is intended for use on Windows, since Linux and OSX already have the cat utility.

While Windows has the type command, it doesn't support the flags supported by cat and the goal of this project is to implement support for these flags.

Usage

cat <file>...

Installation

  1. Build the executable by following the instructions here or by downloading the
    pre-built cat.exe executable.
  2. Copy the cat.exe file to a folder you can add to your environment variables (e.g. C:/bin)
  3. Add that folder to your %PATH% environment variable.

Example

Printing a single file to standard output

cat file.txt

Printing multiple files to standard output

cat file.txt README.md

Displaying the output line number

cat file.txt -n

Building the executable

You can easily build the executable for your architecture with the following command:

go build

Alternatively, there's a pre-built executable for Windows.

Package Rankings
Top 8.17% on Proxy.golang.org