Skip to content

Obvious Thoughts About IT

Tag: bash

Run the bash script until it fails

TL;DR

while ./myscript.sh; do :; done

The one-liner above runs the specified script/command until it exits with a non-zero exit code.

Example:

Run the pytest test until it fails:

while pytest -k test_check_routing; do :; done
Author MinrasPosted on 2018-06-27Categories UncategorizedTags bashLeave a comment on Run the bash script until it fails

Recent Posts

  • Clear Cache in Davinci Resolve
  • Installing Ubuntu as a second system on Mac Mini
  • Phonegap: You may not have the required environment or OS to build this project
  • Installing Robot Framework on [x]Ubuntu 15.04 + PyCharm plugin
  • Finalizing my first application in the Google Play Market
  • Run the bash script until it fails
  • Moving the blog to the new low-end cloud machine :)
  • Python docstring

Meta

  • Register
  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org
Obvious Thoughts About IT Proudly powered by WordPress
We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept All”, you consent to the use of ALL the cookies. However, you may visit "Cookie Settings" to provide a controlled consent.
Cookie SettingsAccept All
Manage consent

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Non-necessary
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.
SAVE & ACCEPT