Skip to content

Sorting output of stats #4

@hamstu

Description

@hamstu

Would be nice to be able to sort the output of the beanstool stats command, I'm using the linux watch command with beanstool and the ordering of the tubes changes from run to run.

In the meantime I've solved it by piping beanstool through a simple python script (in case anyone else wants this:)

#!/usr/bin/env python

import sys

lines = sys.stdin.readlines()
final = []

if len(lines):
    head =  lines[:3]
    foot = lines[-1:]
    body = lines[3:-1]
    body.sort()

    final = head + body + foot

    for line in final:
        print line,

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions