Forum Discussion
I want to find nodes/pools which are associated with all pool/VIPs?
Wow. The commands are working Great. Thanks a lot for your help
Hi jaikumar_f5, I have one more issue that is when ever I am running any .sh(bash script) it is show error. Few of them I have copied from this forum but not able to tset. Could you please help me on this. I am very new in F5 so may be not able to understand the way it work. For example in below script :-
! /bin/bash
output=$(tmsh list ltm virtual |grep "ltm virtual" | awk -F" " '{ print $3 }')
for LINE in ${output}; do
pool=$(tmsh list ltm virtual ${LINE} pool |grep pool |awk -F" " '{ print $2 }')
if [ $pool != none ]
then
echo "Virtual: ${LINE}:"
tmsh list ltm pool $pool load-balancing-mode
fi
done
Error:-
[root@My-VM-Lab-F5-1:Active:Standalone] tmp # ./LBMethod.sh
: No such file or directory
./LBMethod.sh: line 2: $'\r': command not found
./LBMethod.sh: line 3: syntax error near unexpected token `$'do\r''
'/LBMethod.sh: line 3: `for LINE in ${output}; do
[root@My-VM-Lab-F5-1:Active:Standalone] tmp # ls -l
total 58
-rw-------. 1 root root 0 Jul 23 18:02 bwc-tmm.mp.bwcdist
-r--r--r--. 1 root root 171 Jul 24 23:05 dhclient.sh
-r--r--r--. 1 root root 213 Jul 24 23:05 hosts_script
drwxr-xr-x. 2 root root 1024 Jul 24 23:06 hsperfdata_root
drwxr-xr-x. 2 tomcat tomcat 1024 Jul 24 23:06 hsperfdata_tomcat
-r--r-----. 1 root root 702 Jul 24 23:05 httpd_reconfig.pl
-rwxrwxrwx. 1 root root 329 Jul 26 11:52 LBMethod.sh
for most of script I am having same type of issue. I am having very little knowledge on scripting may that's why not able to understand the issue.
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
