-
Notifications
You must be signed in to change notification settings - Fork 33
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
parsing cli tables #31
Comments
Hello @slavaGanzin I just installed eat. It seems to be breaking for me on mac With I also tried couple of commands ll | eat
ls -l | eat Also what will happen if the table contains |
Thanks for investing time in this. Yeah, right. I was using my own fork. Even if my PR was merged inside eat, the npm package was never really updated. $ npm i -g slavaGanzin/eat
$ ps | eat [
{
"PID": "58382",
"TTY": "pts/4",
"TIME": "00:00:02",
"CMD": "fish"
},
{
"PID": "62264",
"TTY": "pts/4",
"TIME": "00:00:00",
"CMD": "ps"
},
{
"PID": "62265",
"TTY": "pts/4",
"TIME": "00:00:00",
"CMD": "nodem"
}
]
Usually, programs that render pretty tables, like this, has |
Hello, Abhimanyu. Awesome tool.
I used eat before and I want to switch to sttr, because of more general use cases covered by it, and because it's a single binary cli. Checks all the boxes.
What I do a lot with eat is parsing standard CLI tables like
ps
ordocker images
:I use this as a preprocessing step before manipulating data with something like
jq
orfx
Actually, I implemented this in eat. Code is super easy, but it works.
antonmedv/eat@0c2bec8#diff-e727e4bdf3657fd1d798edcd6b099d6e092f8573cba266154583a746bba0f346R79-R81
Maybe you could look into it.
The text was updated successfully, but these errors were encountered: