Commit 04351dc9 authored by Alain O' Miniussi's avatar Alain O' Miniussi

correctly list team and labs

parents
#!/usr/bin/env bash
# Labs are directly under the root account
# There is a documented bug in sacct that will print all accounts whatever the filter
# That is, Parent=root only main concequence is that the parent name will only be printed
# if it's root and left banck otherwise.
labs=$(sacctmgr show account WithAssoc format=Account,ParentName Parent=root -P -n | egrep -v "\|$" | sed -e 's/|root//')
for lab in $labs
do
echo Lab: $lab
teams=$(sacctmgr show account WithAssoc format=Account,ParentName Parent=$lab -P -n | egrep -v "\|$" | sed -e "s/|$lab//")
for team in $teams
do
echo Team: $team
done
done
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment