Skip to content

Instantly share code, notes, and snippets.

@gwollman
Created September 29, 2020 18:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gwollman/c13b04b1561f1189c8d34bc46c49a3ce to your computer and use it in GitHub Desktop.
Save gwollman/c13b04b1561f1189c8d34bc46c49a3ce to your computer and use it in GitHub Desktop.
#!/bin/sh
# Yes, I know you could do the egrep inside of sed.
zpool status | egrep '(pool|scan):' | sed '/pool/{N;s/ pool: //;s/\n scan//;}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment