3
rated 0 times
[
3]
[
0]
/ answers: 1 / hits: 37313
/ 3 Years ago, tue, june 8, 2021, 4:13:45
I want to create bash script that it converts output of other scripts (Normally simple text) in a valid json form. How can I do this ?
Example:
awk '/^Mem/ {printf("%u%%", 100*$3/$2);}' <(free -m)
command give me used memory. I want to get output in valid jason form.
Desired output:
{“Memory”:”80”}
More From » bash