I want to get the end date for an installed subscription, and currently using
subscription-manager list --installed | grep Ends | awk '{print $2 }')
The complexity comes when there are multiple subscriptions. How can I get just the end date and name that matches a subscription where the name has "Server" in it?
+-------------------------------------------+
Installed Product Status
+-------------------------------------------+
Product Name: Red Hat Enterprise Linux Server
Product ID: 69
Version: 7.7
Arch: x86_64
Status: Subscribed
Status Details:
Starts: 27/11/19
Ends: 27/11/20
Product Name: Red Hat Enterprise Linux High Availability for x86_64
Product ID: 83
Version: 7.7
Arch: x86_64
Status: Subscribed
Status Details:
Starts: 27/11/19
Ends: 27/11/20