Giter Site home page Giter Site logo

cats's Introduction

Here, placed side-by-side for comparison, are GNU's implementation of
cat, Plan 9's implementation, Busybox's implementation, and NetBSD's
implementation, Seventh Edition Unix (1979), Tenth Edition Unix (1989),
and 4.3BSD.

For good measure (and because I suppose I am now committed to collecting
cats) also included are Second Edition Unix (in assembly) and Inferno's
implementation (in Limbo).

All cat.c files (renamed by prefixing the name of the source source)
are presented, unaltered and in their entirety.  Note how easy it is to
read and understand plan9-cat.c (it should take less than a couple of
minutes possibly even for coders that don't know C).  Other than that,
I think the files speak for themselves.

Keep in mind while reading that the cat utility's purpose is to
concatenate files.

Lastly, here are the line and character counts, sorted:
Lines  Chars  Filename
---------------------------
   35    531  plan9-cat.c
   48    955  busybox-cat.c
   48    986  inferno-cat.b
   63   1130  unix7-cat.c
   64    646  unix2-cat.s
   69   1241  unix10-cat.c
  222   3948  4.3bsd-cat.c
  316   6952  netbsd-cat.c
  782  22684  gnu-cat.c
 1647  39073  total

cats's People

Contributors

pete avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cats's Issues

Encountered a reversible "cat -v"?

Hi!

I'm wondering if you've come across a cat implementation that produces cat -v output that can be uniquely reversed back to the original. It may not be a historical version, but if you have looked into these cats extensively, you may have come across this functionality.

I stumbled upon a project that did just that about a year or two ago, found it interesting, but despite repeatedly combing the web for this (by searching for terms like "invertible", "reversible", "bijective", etc), I can't seem to find it again. It may have been BSD based.

By cat -v, I mean at a high level turning unprintable characters into escaped ones, coded in ASCII. I often do just that, but it would be a nice plus to get back the original should I want it.

In plan9 cat is "argv0" correct?

In the plan9 version of cat, it has

argv0 = "cat";

but argv0 is never defined nor used for anything. Was this copied correctly from the source? I suspect it was supposed to be argv[0] to set the filename. (I don't have plan9 sources at hand to check)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.