A Rust clone of a Perl word-splitting program.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Brennen Bearnes d00b783f50 options: alpha_only, lower_case, shortest, biggest 3 months ago
src options: alpha_only, lower_case, shortest, biggest 3 months ago
tests move word splitting into a function; stub tests 3 months ago
.gitignore initial pass using split_whitespace() 3 months ago
Cargo.toml add --pattern support 3 months ago
README.md README.md: fix quote errors in shell examples 3 months ago

README.md

bpb-words

A command-line utility to split input into a list of words, one per line.

I’m writing this as a learning exercise, based on bpb-kit/home/bin/words.

Work in progress, barely functional at present.

current state

# Operate on standard input:
echo 'one two three' | bpb-words -

# ...or just:
echo "one two three" | bpb-words

# Operate on some file:
bpb-words ./foo

desired features

# list all unique words, ignoring case, in foo:
bpb-words -ui ./foo

# find ten most used words longer than 6 letters in foo:
bpb-words -uci -s6 foo | sort -nr | head -10

installing

???