jc
jc copied to clipboard
Values in "free -w" don't get converted to integers
The "free -w" command splits the "buff/cache" column into a "buffers" column and a "cache" column.
It is necessary to convert the values in the "buffers" and "cache" columns to integers, but currently they are simply output as strings.
That is, I expect something like the following:
$ jc free -w | jq .
[
{
"type": "Mem",
"total": 8053804,
"used": 1305880,
"free": 5557980,
"shared": 60580,
"buffers": 76340,
"cache": 1113604,
"available": 6430688
},
{
"type": "Swap",
"total": 2097152,
"used": 0,
"free": 2097152
}
]
But now the result is
$ jc free -w | jq .
[
{
"type": "Mem",
"total": 8053804,
"used": 1305880,
"free": 5557980,
"shared": 60580,
"buffers": "76340",
"cache": "1113604",
"available": 6430688
},
{
"type": "Swap",
"total": 2097152,
"used": 0,
"free": 2097152
}
]
Merging into dev
to be available in the next jc
release in a few weeks. Thanks!
merged into v1.22.0