Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sort -h friendly output mode #14

Open
wookietreiber opened this issue Sep 5, 2018 · 0 comments
Open

sort -h friendly output mode #14

wookietreiber opened this issue Sep 5, 2018 · 0 comments

Comments

@wookietreiber
Copy link

As someone who writes command line apps and likes pipes, I would like to have a sort -h friendly output, as in:

$ my-rust-app
5.5G    foo
2.6G    bar
16G     baz

$ my-rust-app | sort -hk1
2.6G    bar
5.5G    foo
16G     baz

This should work with both SI and IEC.

wookietreiber added a commit to wookietreiber/bytesize that referenced this issue Jan 2, 2019
- this clarifies the intend beyond of what the previously used si
  boolean can
- users may specify their own formatters
- adds a byte formatter that is compatible with `sort -h`

fixes bytesize-rs#14
wookietreiber added a commit to wookietreiber/bytesize that referenced this issue Jan 2, 2019
- this clarifies the intend beyond of what the previously used si
  boolean can
- users may specify their own formatters
- adds a byte formatter that is compatible with `sort -h`

fixes bytesize-rs#14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants