X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:message-id:date:from:subject:to:references :content-type; q=dns; s=default; b=uuig1jyMNTjW0qJcMp77+4FMuorJi dA+4CRx86e/3BDphnX8R2OFH2lu/An/ALuKmYuRQsPSqgSUcer6wXS42RBGShxyc ES51L1okCTZxlYMUkprFKEaR2MQt5Bvif6+Ud1Fj/yh9W5ogtWPxac0VapdtYYWD SvsiefxTvN7VWs= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:message-id:date:from:subject:to:references :content-type; s=default; bh=63PvAK8WR+zx578AgsC6psL64U0=; b=QQb BfC1fZ1wDAixmX+L+7RdkinkMW6VAoUNN/hwIh2h/seubrYzKyl8w3IpxEgUtydz 3+yRFdXGTaYRiomP7yQ0HY7H8XcuKkv5h+Lh1Qfs4NtI9oKNp7fJTDMHea3h0TD+ WunMp//ZYGyc2gyKHnLZvPvFYWRGa2aumJOcpTgs= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=H*UA:github.com, H*M:google X-HELO: mail-ot0-f179.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:date:from:subject:to:references :user-agent; bh=PR5+gaiCTwxWZwKDFe1f2hMPtd5hVI9CF5bjiuhPA+w=; b=PStI1GtKEr4xzyOWMyoS0IRnT1CMW1qQmOszNAwprtO+ikVYJ/miLW3lvJFGcIBPBr DDh4c3dVoCxRkVsZYjqlFTvS6avtyvH89xKUGcuak+zWnTBEJMPpCCA7jcvGZvKC+9oP bhc5ey8dzV/ow9tHcnflZpmKEZFVfqMu+6gRsgUGi+qZVmCG7FlJQQ4IevCQM3Vq1u9f yZN3+N1r1Hbtf+OebC3xsirfHJ5lspZPB1zMOl/TLBT6MOyxww2MqZQx9zGC7t9mdBTG NAY1Dr/FCBBh94RR3yZAxZ2OjgsFQ7p4SNU28qyKwc83rFhLdFDNhRXOfLp2QI8PUal3 Zb3g== X-Gm-Message-State: AKGB3mJ8rlkSK94PsvgGUEeAFeH+UXJvAJ+3eK9BOwhkVcyshMcIPy4E P9wZIyXfhkHri6B/jtMFTURjYQ== X-Google-Smtp-Source: ACJfBouXMdTWYbbrQ+ey2LfUdVuL5l/M3gPRObCEz205nFU42Vx+LkJjN1y5j5rs+Rs6MSNsDwxxTA== X-Received: by 10.157.52.246 with SMTP id t51mr12752210otd.169.1514419385164; Wed, 27 Dec 2017 16:03:05 -0800 (PST) Message-ID: <5a4434b8.41f3ca0a.39c99.67f8@mx.google.com> Date: Wed, 27 Dec 2017 16:03:04 -0800 (PST) From: Steven Penny X-Google-Original-From: Steven Penny Subject: Re: Run command in new window To: cygwin AT cygwin DOT com References: <096b28f1-2e30-e371-f0b7-e090a24498f5 AT gmail DOT com> Content-Type: text/plain; charset=utf8; format=flowed User-Agent: Tryst/2.0.1 (github.com/svnpenn/tryst) On Wed, 27 Dec 2017 17:46:37, cyg Simple wrote: > $ cygstart bash -c \"echo \\\'\; read\" > $ export z="'" > $ bash -c "echo \\${z}; read" works > $ cygstart bash -c \"echo \\\\${z}\; read\" this assumes that "z" is something, if you do "z=" then it breaks > $ bash -c 'echo \'; read' > > fails to work when I think it should as the \ should cause the ' > following it to be ignored by the command line processor. na, you can never single quote a single quote, it is not possible. you have to split the string on each single quote, assuming the string has any - then you single quote the substrings as needed and escape the single delimiting quotes: $ echo "hello ' world" + echo 'hello '\'' world' it gets more complicated with cygstart because an extra layer of quoting/escaping is added - I about have a function to automate it - hopefully will post soon -- 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