digen / gonix

Clones of the *nix utilities written in go

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

gonix

Clones of the *nix tools written in go

Status

If a program is marked complete, then most/all the standard features are implemented.

  • basename [works]
  • cat [works]
  • cp [works, very incomplete]
  • dirname [complete]
  • echo [works]
  • false [complete]
  • head [works]
  • mkdir [works]
  • nl [works]
  • pwd [works]
  • seq [works]
  • sleep [complete]
  • tail [works inefficiently, needs to be rewritten like head]
  • tee [complete]
  • touch [works]
  • true [complete]
  • xxd [works]
  • yes [complete]

Unimplemented:

  • bc
  • dc
  • ed
  • ls
  • more
  • rm

Bugs

Many tools do not exist and many features are not implemented. I used "flag" to do the flag-parsing, it is a little strict (ie. no combining flags like -xyz instead of -x -y -z).

Building

To keep the binary sizes small (around 20-30kb each, on my PC) I use the gccgo compiler, so you need to have that installed.

Build the project:

$ make

It will compile each program and the binaries will be placed in the build directory.

$ cd build

Running

As long as you are in the same directory as the compiled program, you can run it like so:

./x

Where x refers to the name of the program

WARNING: Keep the programs in a directory NOT in your $PATH or they may end up being run instead of your system's commands.

License

I am releasing this under the terms of the GNU GPLv3 license with ABSOLUTELY NO WARRANTY OR LIABILITY. I have included the license in the file LICENSE.md

This is just one of my coding experiments and should not be used to actually replace your system's tools. I am not liable for whatever these programs might do. Use them at your own risk.

About

Clones of the *nix utilities written in go

License:GNU General Public License v3.0


Languages

Language:Go 87.9%Language:Makefile 10.8%Language:Shell 1.3%