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.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,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 f9a41883 for ; Sun, 7 Jul 2019 23:40:31 +0000 (UTC) Received: (qmail 18878 invoked by alias); 7 Jul 2019 23:40:24 -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: 24028 Received: (qmail 1605 invoked by uid 1010); 7 Jul 2019 23:40:24 -0000 X-Qmail-Scanner-Diagnostics: from mail-pg1-f181.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.101.2/25503. spamassassin: 3.4.2. Clear:RC:0(209.85.215.181):SA:0(-0.7/5.0):. Processed in 0.661188 secs); 07 Jul 2019 23:40:24 -0000 X-Envelope-From: dhenman@gmail.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.215.181 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=to:subject:date:from:message-id; bh=mcliY1Gln5Zq/EV8gLXbl6qySD8qKHhXe/sJ+gjIPdY=; b=HosPtxOUcH+U9l+KAFDnunk+cLouNSE4kq5iNxACcI70KjVvowFB0Ydda5WBeoixlj 1UNm15CRNzQp7B2WOz9GPHw4vMvuZzMsbuZ57+2eDPaQgr3UcXLmhNU0bvESXAsXCK2B cJIXu8FXS+gr12M1xgic5XrYQD0lQblzoYU1GKHtMuT89DpVq8NUIqyQeY8Yb3kYuzOV OSq6kxtsFJrgxnyTWmq/fgLcrBsKsPzprGoUqDoJIg/9pOhLUI+Mb/TMPLmV7eaVJHot JG2Mb7Fss9JqhuOrW4+CmmXBpMXebo31icG4uSV5lPdbvYAVTFqbGBNCPUpFiHaEeP/A lclA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:subject:date:from:message-id; bh=mcliY1Gln5Zq/EV8gLXbl6qySD8qKHhXe/sJ+gjIPdY=; b=A285wfGN9n+LULhokz9WSoJx+byDAK+1b7IPGtJoMJx8dR/6JVH0ogx9lBt/9FY9UN LmFa/yRnWr24I5qGskfnrAi17rDmVkWEpwKVsjeiNUTfijjJFYFHylmXFKnO3srpYx4n Peu0Vtvz2JVHFci3mTGG9rw+a39VyKT1tZID+uLQGG92ZcKvCb3xRjS/LAzDL2+JjR0U Q1GujZXvBaoxxS3eE0JTGLDc2XuSEhdNhcIwj7bdKYs7hal3WptPD39WVt1xvsXBqJGi 2Goc9vI/qfedmeFzBvQsJUHVrA+Qe3X5UVarSa28J54/HL5/H7hGCfFxp+gUf/HR+2lw 2qlg== X-Gm-Message-State: APjAAAXn2KEg0dOrLIqO0AHjiR5dWp08wnfOkFEBLbXphzkS0v+i7Nkw NMGsJb8NO50eL5A5EywkMM50ObU5 X-Google-Smtp-Source: APXvYqw1d1rC1j4I9o7mRDBOH4uOnv3r9oW5Rdx0iqqd81bvJP1nkXgz6CLiWdL+SVoIZae2VCGb9Q== X-Received: by 2002:a63:c64b:: with SMTP id x11mr19679748pgg.319.1562542790575; Sun, 07 Jul 2019 16:39:50 -0700 (PDT) To: Subject: Re: is there a way to use *.{txt,zip,tbz,dmg} if one or more might be X-Mailer: MH-E 8.6+git; GNU Mailutils 3.5; GNU Emacs 26.1 Date: Sun, 07 Jul 2019 16:39:48 -0700 From: "jdh" Message-ID: <20190707163948.6202@Huxley> There shold be two ways to do that; 1.) Using extended flags setopt nullglob # this will last throughout your session or 2.) Add the 'N' flag like this: ls *.{txt,pdf,ods,odg,jpg}(N) # this is on a singular basis You may need to prefix the 'N' like this (#QN) but I didn't have to. ls *.{txt,pdf,ods,odg,jpg}(#qN) TJ Luoma wrote: > This seems like one of those things that I might have not learned that > everyone else knows, so I thought I'd ask. > > I can use this: > > mv -vn *.{txt,zip,tbz,dmg} ~/dir/ > > to move all files that end with zip/txt/tbz/dmg to ~/dir/ > > BUT it will fail if it does not find at least one file with each of > those extensions. > > Is there a way to do basically the same thing, but tell `mv` "if is at > least one file with any of these extensions, then move to ~/dir/" ? > > I suppose I could use `find` with various `-o` flags, but I was > wondering if there was an easier way. > > Thanks! > > Tj > > -- > TJ Luoma > TJ @ MacStories > Personal Website: luo.ma (aka RhymesWithDiploma.com) > Twitter: @tjluoma