07-06-2022 09:11 AM
Hello All!
I am required to cleanup our enterprise fabric and that means I need to deep-dive into the underlying data.
I have already found a query to return the exact data I want - That data being "Every EPG" - Essentially.
moquery -c fvAEPg | grep "dn" | awk '{print $3}'
The result is exactly what I want and is formatted as follows:
tenant | ap | epg |
TENANT123 | AP123 | EPG123 |
At the moment I have a file which is 923 lines long which needs to be formatted one way or another.
If this is possible, can anyone with this experience share with me how best to go about this on the APIC?
Thanks so much in advanced!
~Aukey
Solved! Go to Solution.
07-07-2022 12:27 AM
There are multiple ways to handle this, like awking just for specific info you want, or manipulating the text file (search&replace using regex), but I think it's easier to simply import the data into excel and use "/" as delimiter.
Data -> Insert From Text -> select "/" in step 2:
You will have to adjust your script, to not add automatically the "tn-", "ap-" and "epg-", but I think is faster this way.
Take care,
Sergiu
07-07-2022 12:27 AM
There are multiple ways to handle this, like awking just for specific info you want, or manipulating the text file (search&replace using regex), but I think it's easier to simply import the data into excel and use "/" as delimiter.
Data -> Insert From Text -> select "/" in step 2:
You will have to adjust your script, to not add automatically the "tn-", "ap-" and "epg-", but I think is faster this way.
Take care,
Sergiu
07-07-2022 01:33 AM - edited 07-07-2022 01:34 AM
Once Again @Sergiu.Daniluk you have come to save the day!
I was over complicating matters as usual and didn't think about where I was storing the data to be able to manipulate it there.
To expand this, just for my own sake in case I come back to it, because a tenant, epg and AP, are appended "tn- ap- epg-" I used the substitute command on Excel - This works perfectly remove any appendages and presents clean data, exactly what I wanted!
Thank you once again Sergiu
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide