Skip to content

Instantly share code, notes, and snippets.

@simonLeary42
Created June 4, 2024 16:14
Show Gist options
  • Save simonLeary42/0dfed0d9e6febb5c168ab181fd23bafe to your computer and use it in GitHub Desktop.
Save simonLeary42/0dfed0d9e6febb5c168ab181fd23bafe to your computer and use it in GitHub Desktop.
function nodes_with_state(){
sinfo -N --json | jq -r '.sinfo | .[] | select(any(.node.state[]; .=="$1")) | .nodes.nodes[0]'
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment