jq is useful to slice, filter, map and transform structured json data.
brew install jq
| # Copied from http://ttaportal.org/wp-content/uploads/2012/10/7-Reallocation-using-LVM.pdf | |
| ## | |
| ## Showing the problem: need to reallocate 32GB from /dev/mapper/pve-data to /dev/mapper/pve-root | |
| ## | |
| df -h | |
| # Filesystem Size Used Avail Use% Mounted on | |
| # /dev/mapper/pve-root 37G 37G 0 100% / | |
| # tmpfs 2.0G 0 2.0G 0% /lib/init/rw |
| #!/bin/bash | |
| # Usage: | |
| # | |
| # cat file.yml | load-yaml-dump-json | |
| # ./load-yaml-dump-json # enter data and ctl-d when finished | |
| yaml=`cat` | |
| echo == Perl |
Jon Warbrick, July 2014, V3.2 (for Ansible 1.7)
First one found from of
Content :