I've made a simple script for rebooting my router and afterwards showing a progress bar until my computer has an internet connection again.

When running the script I get the following output:

```
The router is now rebooting...
############################################bin/reboot_router: line 48:  4758 Alarm clock: 14         ping -Q -c 1 -t 1 google.com >&/dev/null
#bin/reboot_router: line 48:  4761 Alarm clock: 14         ping -Q -c 1 -t 1 google.com >&/dev/null
#bin/reboot_router: line 48:  4763 Alarm clock: 14         ping -Q -c 1 -t 1 google.com >&/dev/null
#####bin/reboot_router: line 48:  4773 Alarm clock: 14         ping -Q -c 1 -t 1 google.com >&/dev/null
#bin/reboot_router: line 48:  4775 Alarm clock: 14         ping -Q -c 1 -t 1 google.com >&/dev/null
##bin/reboot_router: line 48:  4777 Alarm clock: 14         ping -Q -c 1 -t 1 google.com >&/dev/null
#

```

I want to suppress the `Alarm clock: 14` thing from appearing, so the output becomes:

```
The router is now rebooting...
#######################################################

```

The relevant part of the script is:

```
#!/bin/bash

COLUMNS=$(tput cols)

# Reboot router code here

echo 'The router is now rebooting...'

min_time=60
max_time=120
start_time=$SECONDS
time=0
progress=0

until [[ $min_time -lt $time ]] && ping -Q -c 1 -t 1 google.com &> /dev/null; do
    let time=SECONDS-start_time
    let new_progress=COLUMNS*time/max_time
    let diff=new_progress-progress
    let progress=new_progress
    for((i=0; i<diff; i++)); do
        echo -n '#'
    done
    sleep 1
done

echo

```