Bug 694831 - Implement abrt-cli -i -o/-O elem1,elem2,elem3
Implement abrt-cli -i -o/-O elem1,elem2,elem3
Status: CLOSED DEFERRED
Product: Fedora
Classification: Fedora
Component: abrt (Show other bugs)
rawhide
Unspecified Unspecified
low Severity unspecified
: ---
: ---
Assigned To: abrt
Fedora Extras Quality Assurance
:
Depends On:
Blocks: ABRTF17
  Show dependency treegraph
 
Reported: 2011-04-08 10:42 EDT by Denys Vlasenko
Modified: 2012-08-10 07:02 EDT (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-08-10 07:02:35 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Denys Vlasenko 2011-04-08 10:42:16 EDT
abrt-cli -i needs -o elem1,elem2,elem3 option which tells which elements to
show, and/or -O elem1,elem2,elem3 option which tells elements to NOT
show. Rationale: abrt-cli -i --full output is way too long because of
smaps, need a way to suppress unneeded elements display.
Comment 1 Fedora Admin XMLRPC Client 2011-12-19 12:41:11 EST
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.
Comment 2 Fedora Admin XMLRPC Client 2011-12-19 12:44:37 EST
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.
Comment 3 Richard Marko 2012-03-19 08:49:32 EDT
(In reply to comment #0)
> Rationale: abrt-cli -i --full output is way too long because of
> smaps, need a way to suppress unneeded elements display.

For me it's easier to use grep/egrep to filter (un)wanted fields than to remember option, format and field names to filter.

For example:
  - instead of abrt-cli list --full -o time,dir you can use

    abrt-cli list --full | egrep -i "time|dir"


  - and instead of abrt-cli list --full -O time,dir you can use

    abrt-cli list --full | egrep -vi "time|dir"

What do you think?
Comment 4 Jakub Filak 2012-04-04 06:27:55 EDT
(In reply to comment #3)
> For example:
>   - instead of abrt-cli list --full -o time,dir you can use
> 
>     abrt-cli list --full | egrep -i "time|dir"

I guess, you should use a little bit extended egrep command, because the used one breaks the output format.

The following command doesn't break anything and gives exactly the same output which was firstly required.

      abrt-cli list --full | egrep -i --color=never "(^(@|time|dir))|(^$)"

IMHO this way is pretty inconvenient when you want to run the command by the exec() functions.

Note You need to log in before you can comment on or make changes to this bug.