PROLIX(1p)
π PROLIX π
okay bestie, welcome to prolix, a page from the User Contributed Perl Documentation section of the manual. it's a lil Perl situation and it's here to make your terminal stop yapping. sit down, hydrate, let's go π«Ά
β¨ NAME β¨
prolix β trim chatty command outputs
πΈ VERSION πΈ
version 0.03
π¦ SYNOPSIS π¦
# Run spammy_command and log its output, but weed out some output
prolix -b '(spam)' -l auto -- spammy_command cmd_opt1 cmd_opt2
# While it's running, hit enter and add another ignore term at the
# interactive prompt
prolix> ignore_substring (more spam)
# Weed uninteresting fields out of a log file.
# Pipe mode is not interactive; but it accepts the same filtering
# arguments as the full interactive mode.
tail -f error.log | prolix -s 's/^\[(.*?\] ){3}//'
π DESCRIPTION π
so here's the tea β prolix launches a command and captures its standard output and error. then it suppresses the uninteresting lines. the way that grep -v could *never*β¦ because unlike "grep -v", prolix is an interactive program. hit enter and you can add suppression patterns as new anoyances come up on your terminal. π you can weed stuff out by full line matches, substring line matches, or regexp β your choice, main character. and you can also apply substitutions to lines, for example to shorten overly chatty fields. iconic.
prolix can be configured to automatically store a filtered log of output from the commands that it captures. lowkey a diary. π
when running in a pipeline, prolix can't interact with you (sad, no vibes exchanged π), but it does accept the same command line parameters, so it acts like a replacement for "sed", "grep -v", and "grep -E -v". periodt.
[Planned] you can have prolix remember different profiles for different command invocations, so that if you often debug a server, prolix (which knows your command line) will identify what ignore/snippet patterns to apply to it. future era, not yet, don't come for me.
β¨ OPTIONS β¨
normally you will run prolix with:
prolix [PROLIX OPTIONS] -- somecommand [COMMAND OPTIONS]
you can also put prolix in a pipeline. yes bestie, both ways:
somecommand | prolix [PROLIX OPTIONS]
-v,--verboseβ when specified,"prolix"will add some output of its own, for example saying it's in pipe mode. it's giving commentary π-p,--pipeβ force pipe mode.-l,--log=FILENAMEβ log filtered output to FILENAME. if the argument looks like a pathname (contains a"/"), we'll use that. otherwise, the output will go to the temporary directory (as defined byFile::Spec->tmpdir).
the special value "auto" lets prolix pick a filename based on the command being run. β¨
the substring "%d" is expanded to a timestamp in a path-friendly variation of iso8601. more substitutions may be added in the future. (stay tuned, i guess π
)
-r,--ignore-re=REGEXPβ ignore files matching REGEXP. this is case-sensitive; use"(?i:...)"to ignore case. (-imay be added in the future.)-n,--ignore-line=LINEβ ignore complete matches on LINE.-b,--ignore-substring=SUBSTRINGβ ignore lines containing SUBSTRING.-s,--snippet=s/SEARCH_RE/REPLACE/β transform lines by applying a Perl substitution on them. useful, for example, in getting rid of uninteresting fields in a logfile. π
here, modifiers "/i", "/g", and "/x" are honored. you can also use alternate delimiters instead of "/", including balanced ones ("s{a}{b}".)
we'll add facilities for doing this in a more convenient way for structured lines in future versions. (for example, CSV or Apache CLF.) not yet, bestie, patience π§
π INTERACTIVE MODE π
when "prolix" launches a program itself (as opposed to pipe mode), pressing enter pauses the display of output from the program, and you're dropped into a prompt. π«Ά here you can add more patterns to ignore or apply new snippetting rules. these will take effect on subsequent output. blank input returns you to the normal running of the command. (just hit enter with nothing, no cap.)
the interactive mode has a "help" command listing available commands. those that add new filters follow the long command line options. so for example, saying "ignore_substring temptation" will ignore all lines containing "temptation". go off.
you can also say "pats" to list all patterns in effect, and "clear_all" to remove them. (removing a particular rule is not supported but we can add it if it is requested. so like, ask and you shall receive π)
π SUPPORT π
you can find documentation for this module with the perldoc command.
perldoc App::Prolix
you can also contact the maintainer at the address above or look for information at:
- AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/App-Prolix/
- CPAN Ratings
http://cpanratings.perl.org/d/App-Prolix/
- RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=App-Prolix
- Search CPAN
http://search.cpan.org/dist/App-Prolix/
- Source repository
https://github.com/gaal/app-prolix
π AUTHOR π
Gaal Yahas <gaal@forum2.org>
π COPYRIGHT AND LICENSE π
this software is Copyright (c) 2012 by Google, Inc.
this is free software, licensed under:
The MIT (X11) License
okay that's the whole page, you ate it, you understood it, slay π
this was PROLIX(1p) from perl v5.36.0, dated 2023-08-25 β and that's the vibe check, periodt. bye bestie π¦β¨
π¦ where this page comes from
- debian trixie: prolix 0.03-3 Β· MIT
- ubuntu noble: prolix 0.03-3 Β· MIT
- ubuntu questing: prolix 0.03-3
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms