bell in bash

usage:

1.

./bell.sh

2.

./bell.sh 6

will ring 6 times.

 

#!/bin/bash

repeat=1
if [[ $# -gt 0 ]] ; then
repeat=$1
fi

function bell_()
{
for i in $(seq 1 $repeat)
do
wait
tput bel
sleep 1 &
done
}
bell_ &
~

posted on 2022-12-03 13:51  guolongnv  阅读(32)  评论(0编辑  收藏  举报