Wnix kawaii /bin/cat wike (≡^-ω-^≡) - concatenate fi-fiwes awnd pwint own the standawd output!
Neko is a very fast and lightweight implementaion of the cat
utility, written in V it is
almost compliant with the IEEE Std 1003.1-2008 (“POSIX.1”)
specification.
Neko converts input to UwU-ify'ed text!
❯ neko interjection.txt
I'd just wike to intewject fow a moment. What you'we wefewwing to as Linyux,
is in fact, GNU/Linyux, ow as I'ffe wecentwy taken to cawwing it, GNU pwus Linyux.
Even though neko does a lot of checks and replacements, it still performs toe-to-toe with GNU cat
❯ time (for i in {1..10}; do neko LICENSE > /dev/null; done)
0.02s user 0.00s system 101% cpu 0.026 total
❯ time (for i in {1..10}; do cat LICENSE > /dev/null; done)
0.01s user 0.00s system 106% cpu 0.006 total
some characters are replaced with kawamojies :3
U_U, >w<, O_O,...
Random stutr is added for a cuter effect
I'd ju-just like to i-in-interject for a moment...
# Clone the repo
git clone https://github.com/flinner/neko.git
# build
cd neko && v -prod .
neko (≡^-ω-^≡) -- concatenate fi-fiwes awnd pwint own the standawd output
neko [-benst] [file..] [-(stdin)]
The neko utility reads files sequentially, writing them to the standard output. The file operands are processed in command-line order. If file is a single dash (‘-’) or absent, neko reads from the standard input.
The Options are as follows
Option | Description |
---|---|
-b |
Number the lines, but don't count blank lines. |
-e |
Print a dollar sign (‘$’) at the end of each line. Implies the -v option to display non-printing characters. |
-n |
Number the output lines, starting at 1. |
-s |
Squeeze multiple adjacent empty lines, causing the output to be single spaced. |
-t |
Print tab characters as ^I . Implies the -v option to display non-printing characters. |
-u |
The output is guaranteed to be unbuffered (unimplemented) |
-v |
Displays non-printing characters so they are visible (unimplemented) |
The neko utility exits 0 on success, and >0 if an error occurs.
- UwU-ify the contents of
file1
to the standard output:
❯ neko file1
- Sequentially print the contents of
file1
andfile2
to the filefile3
, truncatingfile3
if it already exists. See the manual page for your shell (e.g., sh(1)) for more information on redirection.
❯ neko file1 file2 > file3
- Print the contents of
file1
, print data it receives from the standard input until it receives anEOF
(‘^D’) character, print the contents offile2
, read and output contents of the standard input again, then finally output the contents offile3
.
❯ neko file1 - file2 - file3
The neko utility is almost compliant with the IEEE Std 1003.1-2008 (“POSIX.1”) specification. see CAVEATS
The flags [-benstv] are extensions to that specification.
-
Because neko UwU-ifys text, it doesn't comply with IEEE Std 1003.1-2008 (“POSIX.1”)
-
Because some checks require multiple characters, ex
Na
->Nya
, neko can not be truly unbuffered, when-u
is implemented, buffer will be of one line sized. -
-v
flag is not POSIX standard. As such, there are no plans to implement it
A Lot of the README.md
was taken from Openbsd's cat(1) man page