# type repeat ;echo "this is a bash shell output"
repeat is a function
repeat ()
{
local n i;
n="$1";
shift;
for ((i = 1; i <= "$n"; ++i))
do
echo Date starting `date`;
echo Before waiting `date`;
sleep 6;
echo Done waiting `date`;
/usr/bin/mpv /usr/share/sounds/freedesktop/stereo/complete.oga;
/usr/bin/mpv /usr/share/sounds/freedesktop/stereo/complete.oga;
/usr/bin/mpv /usr/share/sounds/freedesktop/stereo/complete.oga;
"$@";
done
}
I would like to add this function for the alias repeat in fish shell. This alias is already available in bash shell but I would like to use the same in fish shell also. # indicates its the root user. For normal users its Fish shell which has been set as default.
Well this is the answer I have come up with and it works. It uses the mpv media player. Let me know if any further changes can be done.