![]() ![]() This will produce average stats as follows, indicating that multiple load balancer ICMP ECHO_REQUEST average time was 19-20 milliseconds Finding ping time for multiple IP addressesįor i in $ips do ping -q -c 4 "$i" done It would be best if you set up ssh keys for automation purposes or running scripts from Linux/Unix cron jobs. See why we used DEBIAN_FRONTEND apt-get variable to avoid any prompts during updates. Latest bash version 3.0+ has inbuilt support for setting up ranges: #!/bin/bashīash v4.0+ has inbuilt support for setting up a step value using " Sometimes you may need to set a step value (allowing one to count by two’s or to count backwards for instance). A representative example in BASH is as follows to display welcome message 5 times with for loop: #!/bin/bash The for loop executes a sequence of commands for each member in a list of items. The range is specified by a beginning (#1) and ending number (#5). ![]() This type of for loop is characterized by counting. OR for OUTPUT in $(Linux-Or-Unix-Command-Here) Numeric ranges for syntax is as follows: for VARIABLE in 1 2 3 4 5.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |