Skip to content

A simple CLI for replacing all occurences of a word with a different word

License

Notifications You must be signed in to change notification settings

t1mtw0/word_replacement

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Word Replacement

A simple CLI for replacing all occurences of a word with a different word, using rust.

Example

cd word_example

echo 'the quick brown fox jumps over the lazy dog' > example.txt

cargo run -- --filename example.txt --words the this

Inside the word_example directory, there should be a file called replaced.txt that should contain the contents:

this quick brown fox jumps over this lazy dog

Usage

word_replacement [OPTIONS]

Use -- --help for help regarding options for how to use the command line arguments.

USAGE:
    word_replacement [OPTIONS]

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

OPTIONS:
    -f, --filename <FILE>                              Sets the text file
    -w, --words <replacing_word> <replacement_word>    Sets the two words to be used to process the text

About

A simple CLI for replacing all occurences of a word with a different word

Resources

License

Stars

Watchers

Forks