This is a sample data:
+-------+--------------------+-----------+------------+-----------+-------------+
| ID | Name | Status | Networks | Image | Plan |
+-------+--------------------+-----------+------------+-----------+-------------+
| 1wsd | HostName A | PAUSED | IP=1.1.1.1 | Ubuntu20 | PlanA BGP40 |
| 4fgh | An other hostname | ACTIVE | IP=2.2.2.2 | Ubuntu20 | PlanB BGP30 |
| zxd1 | final.destination | REBOOTING | IP=3.3.3.3 | Debian11 | PlanA BGP10 |
| 60hn | no problem | ACTIVE | IP=4.4.4.4 | Centos7 | Plan BGP90 |
+-------+--------------------+-----------+------------+-----------+-------------+
I want to print only Plan
column only, but as you see, it's not a fixed column number. For example for 1.1.1.1
, the plan name is in the from 11
to the end (let's suppose from the end, but we can remove the |
at the end of line).
First, it should filter only the Plan
column (the format is like this and is table-like), and we can exclude the first three lines of header and the one last line of the tail so that we can only have the plan names.
Expected output is only plan names:
PlanA BGP40
PlanB BGP30
PlanA BGP10
Plan BGP90
I'm googling but didn't find a way up to now.