Skip to content

Instantly share code, notes, and snippets.

@kamilogorek
Last active August 30, 2023 19:25
Show Gist options
  • Save kamilogorek/635251990c0a15ad721525287b0268e9 to your computer and use it in GitHub Desktop.
Save kamilogorek/635251990c0a15ad721525287b0268e9 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
fn() {
echo "Return is just placeholder exit code, rely on command instead"
return 1
}
i=1
while true; do
echo "Run attempt: $i"
((i++))
fn
if [ $? -eq 1 ]; then
break
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment