Created
August 16, 2024 02:00
-
-
Save briancline/a1d5efeb9284e1d7c5a6df5f4ffd9753 to your computer and use it in GitHub Desktop.
Handy RHEL commands
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
## Way easier to read list of enabled repos | |
subscription-manager repos --list \ | |
| tail -n +4 \ | |
| tr '\n' '|' \ | |
| sed -r \ | |
-e 's/Repo ID:/\nRepo ID:/g' \ | |
-e 's/Repo ID:\s+([^|]+)\|Repo Name:\s+([^|]+)\|Repo URL:[^|]+\|Enabled:\s+([01])\|{1,}/\3\t\1\t\2/g' \ | |
| sed -r -e 's/^0/·/g' -e 's/^1/★/g' \ | |
| sort --field-separator $'\t' -k2 \ | |
| column -t -s $'\t' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment