From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from primenet.com.au (ns1.primenet.com.au [203.24.36.2]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id 57859ca2 for ; Fri, 21 Jun 2019 01:39:19 +0000 (UTC) Received: (qmail 26851 invoked by alias); 21 Jun 2019 01:39:12 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: List-Unsubscribe: X-Seq: 23977 Received: (qmail 80 invoked by uid 1010); 21 Jun 2019 01:39:12 -0000 X-Qmail-Scanner-Diagnostics: from mail-lf1-f43.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.101.2/25482. spamassassin: 3.4.2. Clear:RC:0(209.85.167.43):SA:0(-1.9/5.0):. Processed in 1.963125 secs); 21 Jun 2019 01:39:12 -0000 X-Envelope-From: schaefer@brasslantern.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.167.43 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=58bqoJjIg5GnzpYeTHadQzeZmbcvzLnfCPFPk0f7AwE=; b=ugB+dJ/XsrlS0qhh8v8P/PgETz7wngrKxBNUCkFqXhCI6Ilc1+xucBP4cLPc0s0o8c ANxyipqLEuo1w7KpXkAt/47Xu+T80nncckUWgY+hfYkmHwNhyWbWkfjCwpYvdDhwcXVe AgLMvqb4IF5/iCj4AMn6gLtMVuwCRZR0DF2kwqPyoGNQiXAK6SWLm0IMMQFHxvGHaDpF eGhdvryh3pykLS1z6tkW8N8Oy8tGvKi6yELJKED50VMxQTfnmBBjIQuEkcJwq0sB9O00 gqtbVzdEz/7b2RWUQNN8FrbHhKC04VYnkQskaozZONaxoyhQ7FJewmScAI1gEsXn89F0 c0BQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=58bqoJjIg5GnzpYeTHadQzeZmbcvzLnfCPFPk0f7AwE=; b=IkWcMwPQ2AGrdb0LispuXrmIw4lEsC+AF6LfuAfSISAgH1HDEzF/ShF57OjZkYV8ij jRRMZUtiTDd7MsHVA79RCo90ZTr0K+wrImPzPyxIT8j1f+PggD1+YpjyNGde6kgicl2p wiEHtqs8rJqurYpS0UbXqrS/hl1yUOLHvWZV1AIJYrIckKhZaqMHpaxRPsyXT+5T9Sxq /PxDZSvP78wrujCT/yKq4cp5/d0LWNozH1OWBTn0tx1cjqRNhY7gKA+HBw0xVmBmKFI6 pROXHcFdy88hwb2fWk2L/tgQmt13KJvRKUnq+EuhXNWsWEEtPVYr2PskNTclj7K77aJJ mCmw== X-Gm-Message-State: APjAAAWBctaShSLfe+7ITYdI0yYlLIhZZoWtswEBI8txWgmczlZxEOUa cjsvZJnDMmi+sEyHKlOAGVEzDMDZnl6j0A5XeO4Kk7C9qDs= X-Google-Smtp-Source: APXvYqy4/2XfMyX3+yl9/HGEkWoU1Qe+0lx+8yBPpQf0plKXB42AH95S7lXCUOjAYzKc7USelwoDoNMCjLa2QzQ7LKY= X-Received: by 2002:a19:a550:: with SMTP id o77mr13552709lfe.81.1561081114820; Thu, 20 Jun 2019 18:38:34 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Bart Schaefer Date: Thu, 20 Jun 2019 18:38:23 -0700 Message-ID: Subject: Re: how to either ignore or deal with Icon$'\r' files on macOS To: TJ Luoma Cc: Zsh Users Content-Type: text/plain; charset="UTF-8" On Thu, Jun 20, 2019 at 5:06 PM TJ Luoma wrote: > > Icon$'\r' So, $'\r' is zsh's representation of a carriage return character. It's very strange that anything would deliberately be using carriage-return in a file name, but ... > for i in * > do > if [ "$i" != "Icon$'\r'" ] > then > echo "$i" > fi > done $'\r' is already a form of quoting, just *don't* put it in double-quotes: for i in * do if [[ "$i" != Icon$'\r' ]] then # whatever fi done You should know better by now than to expect echo to faithfully reproduce things on its output, it does way too much interpretation of the argument strings. In this case, however, the trailing carriage-return is already "invisible" and echo isn't going to do anything to make it appear.