Skip to content

A motley collection of quick hacks to count the occurrences of each login shell in a passwd file

License

Notifications You must be signed in to change notification settings

crumbtoo/passwd-shell-benchmarks

 
 

Repository files navigation

passwd-shell-benchmarks

A collection of programs in different languages, which perform the following task:

  • Open a colon delimited unix password file (provided here) in the current directory
  • Read the file and count the instances of each login shell (the last field)
  • For each login shell, print the number of accounts using each shell

A script is included, which runs each of the programs and times the results for each

To date, the following languages are represented:

  • c
  • c++ (thanks izder456!)
  • go
  • julia
  • lisp
  • ms powershell
  • node.js
  • perl
  • python
  • ruby
  • rust (thanks CordlessCoder!)
  • crystal-lang (thanks izder456!)
  • shell/awk
  • Lua (thanks CordlessCoder!)

If you're an expert in a language not listed here, we welcome your contribution!

About

A motley collection of quick hacks to count the occurrences of each login shell in a passwd file

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 43.4%
  • Shell 17.1%
  • C 12.8%
  • Crystal 4.9%
  • Common Lisp 3.8%
  • Haskell 2.8%
  • Other 15.2%