From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 74744 invoked by alias); 14 Jul 2017 00:16:55 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 74521 invoked by uid 89); 14 Jul 2017 00:16:54 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.5 required=5.0 tests=BAYES_00,DATE_IN_PAST_24_48,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=no version=3.3.2 spammy=ls, sk:project X-HELO: mail-it0-f50.google.com Received: from mail-it0-f50.google.com (HELO mail-it0-f50.google.com) (209.85.214.50) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 14 Jul 2017 00:16:53 +0000 Received: by mail-it0-f50.google.com with SMTP id v202so8072057itb.0 for ; Thu, 13 Jul 2017 17:16:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:content-transfer-encoding:mime-version:date :subject:message-id:to; bh=dVbfQvF5Fea/zCBxxz2u46q0I8SntaKEqavI05l9PSE=; b=A2nYv8r96qNkDvDihc+walwrqnaIwvGV483ALXZ7rWeV+2xVttCJKCZ64B+bI4XluC 2lVIEnVWMS89ZuO9FA1tKnKnnaSwxNfxo6Tw/vFhu3lfdGQ5CHnt87qms0NOBT904spI b8zFvwpt4HOLwqv3491SjNuNw/2LluIcLzgOZR0iwDoNsI0efb1tEGsGgyLOpUPK1l9s QmJJT7/JPvH+M6UDUWiGaCjbyLk7v9bcgtYZvXu36wMG2erVEoQDnROG+tzVIjTTpV1t muS1dnjYXSEUCbJmXIaHDxV1Ho0Pzt82oWIeHl1Cnww/VHepmWeIWKtjEFvUahqNiNpw NkUg== X-Gm-Message-State: AIVw111bixx0FagQIY0x/rSGxSjz6PrsEQJuRxEpxgDCvHmuNxZ2UDnP KgcB6PpppFXsprZVR94= X-Received: by 10.36.41.204 with SMTP id p195mr1638211itp.12.1499991411777; Thu, 13 Jul 2017 17:16:51 -0700 (PDT) Received: from [192.168.0.7] ([72.26.86.162]) by smtp.gmail.com with ESMTPSA id y83sm4690179ioe.17.2017.07.13.17.16.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 13 Jul 2017 17:16:51 -0700 (PDT) From: Bryan Dunphy Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Date: Fri, 14 Jul 2017 00:16:00 -0000 Subject: How to repeat a bash shell script until success Message-Id: <97021E71-D804-42AF-8358-6276AF4514AB@gmail.com> To: cygwin@cygwin.com X-SW-Source: 2017-07/txt/msg00226.txt.bz2 I have a shell script, originally created for Mac OS X. that waits for an e= xternal drive to be mounted (by testing an =E2=80=9Cls=E2=80=9D of the volu= me=E2=80=99s root directory for success) then runs an =E2=80=9Crsync=E2=80= =9D command. How do I get the script to be run repeatedly until successful exi= t under Cygwin? Here is the unmodified Mac OS version of the script: #!/bin/bash if ls /Volumes/Shared >/dev/null 2>/dev/null then rsync -avz --compress-level=3D9 --delete-during --partial --exclude= 'cache/' aleph.gutenberg.org::gutenberg /Volumes/Shared/Project-Gutenberg exit 0 else exit 1 fi -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple