Files
dotfiles/local/bin/x-until-error
2023-03-27 10:01:02 +03:00

14 lines
178 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