From aadc7bc5e6e9bb2ed80fca53f991dbf40973abb8 Mon Sep 17 00:00:00 2001 From: Jim Myhrberg Date: Mon, 11 Sep 2017 15:30:35 +0100 Subject: [PATCH] Clean up untilfail executable --- bin/untilfail | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/bin/untilfail b/bin/untilfail index e9be500..d42036d 100755 --- a/bin/untilfail +++ b/bin/untilfail @@ -1,10 +1,8 @@ -#!/bin/bash +#!/usr/bin/env bash + count=1 echo "====> Attempt $count" -$@ -(( count++ )) -while [ $? -eq 0 ]; do - echo "====> Attempt $count" - $@ +while "$@"; do (( count++ )) + echo "====> Attempt $count" done