Skip to content

Instantly share code, notes, and snippets.

@freyes
Created March 16, 2017 15:39
Show Gist options
  • Select an option

  • Save freyes/523409ecfec5d5cf53a20d209dd57349 to your computer and use it in GitHub Desktop.

Select an option

Save freyes/523409ecfec5d5cf53a20d209dd57349 to your computer and use it in GitHub Desktop.
#!/bin/bash
for dname in `find . -maxdepth 1 -type d -name 'sosreport-*' `;do
for NAME in $(grep jujud ${dname}/ps | grep unit- | awk -F' ' '{print $11}' | cut -d'/' -f6); do
echo "${dname} -> ${NAME}"
ln -s ${dname} $NAME
done
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment