Skip to content

Instantly share code, notes, and snippets.

@rubo77
Last active August 29, 2015 14:04
Show Gist options
  • Save rubo77/082dacc5a4858528b09f to your computer and use it in GitHub Desktop.
Save rubo77/082dacc5a4858528b09f to your computer and use it in GitHub Desktop.
alfred-log.sh
nodes='cat alfred.json';
files=logs/nodes;
mkdir -p $files;
$nodes|jq '.[].network.mac'|while read i; do
$nodes |jq '.['$i']' > $files/$($nodes |jq '.['$i'].hostname');
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment