Skip to content

Latest commit

 

History

History
36 lines (28 loc) · 618 Bytes

README.md

File metadata and controls

36 lines (28 loc) · 618 Bytes

freq

Counts number of [a-zA-Z]+ words in given file or standard input and outputs it to a file or standard output.

Usage

Run

$> cargo run --release -- pg.txt out.txt

Run with echo:

$> echo "this is a test message with a duplicated words: 'message, test, this'" | cargo run --release -- -
    Finished release [optimized] target(s) in 0.03s
     Running `target/release/freq -`
2 a
2 message
2 test
2 this
1 duplicated
1 is
1 with

Build

$> cargo build --release
    Finished release [optimized] target(s) in 0.06s
$> ./target/release/freq pg.txt out.txt