-
Notifications
You must be signed in to change notification settings - Fork 330
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
Feature request #86
Comments
Disclaimer: I'm not a shell expert, but I'll give some options I can think of. Based on I can't comment on if this will work for <process generating output> | jq --unbuffered -c '.' | gron -s This will represent each JSON object as a value inside a JSON array, so a continuously running process can lead to very large number array index. If you don't want the wrapping array, another possible option would be to send <process generating output> | jq --unbuffered -c '.' | while read -r line; do echo "$line" | gron; done Not too sure if there is a shell trick to restart For
Option 1 is the implemented |
nah it doesn't work.. anyway.. I stopped working on the script |
Not sure if I understood the question right, but maybe E.g. place this script in #!/bin/bash
jq -c --null-input --arg uptime $(uptime | awk -F' ' '{ print $1 }') '{ uptime: $uptime }' | gron Then run |
Yesterday I was testing intel_gpu_top utility in linux which gives some information & has an option to output json with -J flag
I wanted to write a script using this functionality using gron.. That utility constantly outputs in json which looks like this:
My problem with is that it stops after reading the first value outputted by the tool. then the process stops... I want it to constantly
show the output..
Example:
It formats the output only one time and the stops but I want to do it constantly
Is their some shell trick that can be used to do this (or a new feature)
Thank you
@Albonycal
The text was updated successfully, but these errors were encountered: