Advertisement
metalx1000

JSON conversion with jc

Sep 28th, 2023
1,525
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.46 KB | None | 0 0
  1. cat people.csv|jc --csv --pretty
  2. ps aux | jc -p --ps
  3.  
  4. LC_ALL=C date | jc --date --pretty
  5.  
  6. jc --pretty dig www.google.com
  7.  
  8. arp | jc -p --arp
  9. ifconfig | jc -p --ifconfig
  10.  
  11. ifconfig wlp0s20f3|grep 'inet '|awk '{print $2}'
  12. ifconfig | jc --ifconfig -p|jq -r '.[]|select(.name=="wlp0s20f3").ipv4_addr'
  13.  
  14. ls -l /usr/bin | jc -p --ls
  15.  
  16. ping 8.8.8.8 -c 3 | jc -p --ping
  17. uptime | jc -p --uptime
  18.  
  19. wget -qO- "https://www.w3schools.com/xml/cd_catalog.xml"| jc -p --xml
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement