Skip to content

Instantly share code, notes, and snippets.

@drscream
Created February 1, 2018 13:37
Show Gist options
  • Save drscream/28bd173b3705a5df8e8ddc4d66a4a0a2 to your computer and use it in GitHub Desktop.
Save drscream/28bd173b3705a5df8e8ddc4d66a4a0a2 to your computer and use it in GitHub Desktop.
awk -v pat='zonename|create_timestamp|billing_id|owner_uuid|mac|uuid|zone_state|zonepath|zoneid|last_modified|server_uuid|datacenter_name|state|boot_timestamp|pid|zfs_root_recsize|zfs_filesystem|zpool|zfs_data_recsize' '$0~pat {n=2}; n {n--; next}; 1' x.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment