Skip to content

Instantly share code, notes, and snippets.

@orimanabu
Created May 16, 2017 15:32
Show Gist options
  • Save orimanabu/1da8b89b50f04db2653252b327c2b07a to your computer and use it in GitHub Desktop.
Save orimanabu/1da8b89b50f04db2653252b327c2b07a to your computer and use it in GitHub Desktop.
subscription-manager helper??
#!/usr/bin/env perl
$flag = 0;
while (<>) {
chomp;
if (/^Subscription Name:\s+(.*)/) {
$subscription_name = $1;
$flag = 1;
}
elsif (/^$/) {
print "$subscription_name\t$system_type\t$pool_id\n";
}
elsif (/^Pool ID:\s+(.*)/) {
$pool_id = $1;
}
elsif (/^System Type:\s+(.*)/) {
$system_type = $1;
}
else {
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment