Created
June 12, 2013 20:51
-
-
Save hughsaunders/5769000 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(os)hugh@devstack:/opt/stack/python-openstackclient$ keystone role-list | |
+----------------------------------+---------------+ | |
| id | name | | |
+----------------------------------+---------------+ | |
| dfdd1fd1b08b456fba9f8aa1b0dd33e6 | Member | | |
| 250c5ab9cd594e8282384c55aaa3fade | ResellerAdmin | | |
| 9fe2ff9ee4384b1894a90878d3e92bab | _member_ | | |
| 7ef175a354fa45c995230ee8b6b6844b | admin | | |
| 359ba4b91991496f9ec7fa312dfa23f7 | anotherrole | | |
+----------------------------------+---------------+ | |
(os)hugh@devstack:/opt/stack/python-openstackclient$ keystone role-list |awk -F\| '$3 ~ /\yMember\y/{print $2}' | |
dfdd1fd1b08b456fba9f8aa1b0dd33e6 |
cat jason | awk -F| '$3 ~ /\WMember\W/{print substr($2,2)}'
5b089ca3d7c04e71b0fca3b7de28bafa
UUOC :)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
root@jason-de155:~# keystone role-list
+----------------------------------+----------------------+
| id | name |
+----------------------------------+----------------------+
| 271328bbf12b4445b8c4587efaa8ccc0 | KeystoneAdmin |
| b339c5fdf46b4fc2a1a8b4121346e042 | KeystoneServiceAdmin |
| 5b089ca3d7c04e71b0fca3b7de28bafa | Member |
| 9fe2ff9ee4384b1894a90878d3e92bab | member |
| 077269c4071345a6a3737246e387e30b | admin |
+----------------------------------+----------------------+
root@jason-de155:
# keystone role-list |awk -F| '$3 ~ /\yMember\y/{print $2}'#root@jason-de155: