Forum Discussion
Fetch all details about VS, POOLS, Nodes, etc.
Hi,
I tried this script. Getting the same error.
'B_Capture.txt: line 6: syntax error near unexpected token
'B_Capture.txt: line 6:for VS in $VIRTUALS;
added "!/bin/bash" on top of the script as well.
+++++++++++++++++++++ tmp cat LB_Capture.txt
!/bin/bash Making headings & intialize the fileecho Virtual-Server, Destination, Pool, Pool-Members > /var/tmp/$HOSTNAME.csv
Capture all virtuals in the LTMVIRTUALS=$(tmsh list ltm virtual | grep "ltm virtual" | cut -d" " -f3) for VS in $VIRTUALS; do DEST=$(tmsh list ltm virtual $VS | grep destination | cut -d" " -f6) POOL=$(tmsh list ltm virtual $VS | grep pool | cut -d" " -f6) if [ -n "$POOL" ]; then MBRS=$(tmsh list ltm pool "$POOL" | grep address | cut -d" " -f14) fi echo $VS,$DEST,$POOL,$MBRS >> /var/tmp/$HOSTNAME.csv done +++++++++++++++++++++++
Do suggest!!
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com