"ef" is a util command about check a text file.
Made by Rust.
- -f : target file name. (need)
- -s : regex pattern (need)
- -n : display line numbers or not. (flag)
- -b : with separate bar. (flag)
- -l : displays lines what are placed near a line what be matched with a given regex pattern. (int/ 0 ~)
(e.g on test.txt
)
hello world
second line
third line
forth line
fifth line
goodbye world
command : cargo run -- -f=test.txt -s=world
hello world
goodbye world
command : cargo run -- -f=test.txt -s=world -l=1 -b
==========
hello world
second line
==========
fifth line
goodbye world
command : cargo run -- -f=test.txt -s=world -l=1 -n -b
==========
1 hello world
2 second line
==========
5 fifth line
6 goodbye world