An Elixir implementation of the Unix wc command line utility
- Elixir 100%
|
All checks were successful
Elixir CI / Build and test (push) Successful in 2m11s
|
||
|---|---|---|
| .forgejo/workflows | ||
| lib | ||
| test | ||
| .formatter.exs | ||
| .gitignore | ||
| AGENTS.md | ||
| LICENSE | ||
| mix.exs | ||
| README.md | ||
wcx
An Elixir implementation of the Unix wc command line utility.
Build
mix escript.build
This produces a wc binary in the project root.
Usage
./wc [OPTION]... [FILE]...
Read from stdin when no files are given:
echo "hello world" | ./wc
Options
| Flag | Long | Description |
|---|---|---|
-l |
--lines |
print the newline counts |
-w |
--words |
print the word counts |
-c |
--bytes |
print the byte counts |
-m |
--chars |
print the character counts |
-L |
--longest |
print the longest line length |
-h |
--help |
display help and exit |
Default (no flags) is equivalent to -lwc.