Files
dotfiles/local/bin/x-until-error
2023-01-12 16:49:49 +02:00

16 lines
184 B
Bash
Executable File

#!/bin/sh
#
# About
# -----
# Repeat the command until it fails - always run at least once.
#
"$@"
#
# If the status code was zero then repeat.
#
while [ $? -eq 0 ]; do
"$@"
done