#text #filter

bin+lib aki-mline

match line, regex text filter like a grep of linux command

10 releases

new 0.1.19 Apr 7, 2021
0.1.18 Mar 22, 2021
0.1.12 Feb 22, 2021

#20 in #filter

Download history 18/week @ 2021-02-06 19/week @ 2021-02-13 18/week @ 2021-02-20 23/week @ 2021-02-27 43/week @ 2021-03-06 34/week @ 2021-03-13 36/week @ 2021-03-20 11/week @ 2021-03-27 25/week @ 2021-04-03

68 downloads per month

MIT/Apache

21KB
439 lines

aki-mline

aki-mline is the match line, regex text filter like a grep of linux command.

Features

aki-mline is the match line, regex text filter like a grep of linux command.

  • command help
aki-mline --help
Usage:
  aki-mline [options]

match line, regex text filter like a grep.

Options:
      --color <when>    use markers to highlight the matching strings
  -e, --exp <exp>       regular expression
  -s, --str <string>    simple string match
  -i, --inverse         output non-matching lines.

  -H, --help        display this help and exit
  -V, --version     display version information and exit

Option Parameters:
  <when>    'always', 'never', or 'auto'
  <exp>     regular expression
  <string>  simple string, non regular expression

Environments:
  AKI_MLINE_COLOR_SEQ_ST    color start sequence specified by ansi
  AKI_MLINE_COLOR_SEQ_ED    color end sequence specified by ansi
  • minimum support rustc 1.38.0

Quick install

  1. you can install this into cargo bin path:
cargo install aki-mline
  1. you can build debian package:
cargo deb

and install .deb into your local repository of debian package.

Examples

Command line example 1

Extract "arm.*-gnu" from the rustup target list

rustup target list | aki-mline -e "arm.*-gnu"

result output :

out rustup image

Command line example 2

Extract "apple" from the rustup target list

rustup target list | aki-mline -s "apple"

result output :

out rustup image 2

Library example

See fn execute() for this library examples.

Changelogs

This crate's changelog here.

Dependencies

~1.3–1.8MB
~47K SLoC