Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- #######################
- # Bash Testing Script #
- #######################
- function _MENU_BAR
- {
- printf "|--------------------------------|\n"
- }
- clear
- printf "Testing Script v1.0 - Output Test\n"
- _MENU_BAR
- ###### "|--------------------------------|\n"
- printf "| Google Ping | Starting... |\n"
- printf "| Bing Ping | Starting... |\n"
- printf "| Custom IP | Starting... |\n"
- _MENU_BAR
- google_ping=$(ping -c 2 www.google.com | grep -oP '\d+(?=% packet loss)') &
- bing_ping=$(ping -c 2 www.bing.com | grep -oP '\d+(?=% packet loss)') &
- Cust_Ping=$(ping -c 2 10.1.1.1 | grep -oP '\d+(?=% packet loss)' ) &
- printf "\e[8;0H\e[36m<<Pinging in Progress>>\e[0m\n"
- wait
- printf "\e[3;21H\e[32m\e[K %3d\e[0m\t |" $google_ping
- printf "\e[4;21H\e[32m\e[K %3d\e[0m\t |" $bing_ping
- printf "\e[5;21H\e[32m\e[K %3d\e[0m\t |" $Cust_Ping
- printf "\e[8;0H\e[K\e[0mPings Complete!\n"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement