From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26676 invoked by alias); 12 Dec 2015 06:49:10 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 37393 Received: (qmail 1159 invoked from network); 12 Dec 2015 06:49:09 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:date:in-reply-to:comments:references:to:subject :mime-version:content-type; bh=xPTwuQXzYiwboXrn1D3WAeYa1WvgVugcCdLt+748fGg=; b=geKXlod/70ScNq7QHSSYGPjOQq+gYtRxp7joKFd0Px/vHNUIwltGr2FrCZAMNsMw8X gVD+xqheTWBu8HOni+qj5gLex/zri48so/UAtwGtF3xEGwc7Db6Cb13AS3SFg8t9LVPr uJFHnOA2lZ7wtpYzXPQ1sJxlKoJo2MGh3Lm9/v5CI+ysZ1BScXZc2ECePzY/AkyqxLAt zXP/MaAcUrP9Xhd+swiHqh6YpKm2Ad3hQhFDX6pSQEtlzk2rpLxfmALxx2ML9VDe00Vl XDSt70wgyRVPEcxx0E3MAUXouff+H3TfoVOjNIF0k8URfjsuZAJ+n7RYyNeglMkkZdTJ Uk1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:message-id:date:in-reply-to:comments :references:to:subject:mime-version:content-type; bh=xPTwuQXzYiwboXrn1D3WAeYa1WvgVugcCdLt+748fGg=; b=FpoI1/+D5tDqtndGv2nm3aiN3uvRBaGcds2bbMT33YTC7VdCv3n46ULldn7iJnxEu8 ICK0JiV5Voc5BnkYek4XsRVrwfbYDvs3gB7haXmqjQ9sEtvv3AR0ysxro8VTvkvNeWG2 aqGSf428lTvRVxBoHBey7LSqDSZXOAE1e6shsspYgXmCKZJKcR2SHteYgWMl+lQ0UVLg oa4dqPlp+5QlzbySQ+IH35jeLN4QkqKtVWBP9qonsJuUsule5vAPnO+WyuuKmZ4ppBJn K66Jwt6lt9A8m7N4OeqwKFg03lFklb+FcsOOTB70oZJCAqxjb11BU7r6H8e0jHEMjx3s JVKw== X-Gm-Message-State: ALoCoQlyLsyNXfkn/qvVbwUrF4qZC2kHwYOb71Ac1qN26fKIuaU0dsLMTqXeJVgEU12fID783Ef1KeHGvnZ5yOf0SLpr3fXczA== X-Received: by 10.98.2.197 with SMTP id 188mr20596125pfc.135.1449902947516; Fri, 11 Dec 2015 22:49:07 -0800 (PST) From: Bart Schaefer Message-Id: <151211224922.ZM4583@torch.brasslantern.com> Date: Fri, 11 Dec 2015 22:49:22 -0800 In-Reply-To: <18080.1449807713@thecus.kiddle.eu> Comments: In reply to Oliver Kiddle "Re: [PATCH] portable mechanism to determine noatime" (Dec 11, 5:21am) References: <566272DD.6010305@gmx.com> <56632A3A.6000002@gmx.com> <11850.1449365147@thecus.kiddle.eu> <151210004823.ZM29850@torch.brasslantern.com> <151210005516.ZM29920@torch.brasslantern.com> <18080.1449807713@thecus.kiddle.eu> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-workers@zsh.org Subject: Re: [PATCH] portable mechanism to determine noatime MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Dec 11, 5:21am, Oliver Kiddle wrote: } } Bart wrote: } > df ${$(mount || /sbin/mount | awk '/noatime/ {print $1, $3}'):-""} } } I needed some tweaks to make that work for me. Indeed, sorry about that. I just noticed I missed the subshell around (mount || /sbin/mount) [or braces would also work]. } I need -- after df } because of automounter entries such as -hosts being interpreted as } options. Braces around the two mount bits seem to be needed. And it } doesn't work to fgrep for the full output of $(df .) - just the first } word on the last line. Oh, duh, have to discard the first line from df with the column labels. But the whole point is to not search for just one word: { df -k -- ${$({mount || /sbin/mount} | awk '/noatime/ {print $1,$3}'):-""} | fgrep "$(df -k . | tail -1)" } >&/dev/null Searching for a full line rather than only for one word avoids the btrfs issue you mentioned, among other things. Is there a reason the single >&/dev/null isn't enough to throw away all the spurious output? The additional two >&/dev/null that you added to your edit only do the expected thing if multios is set (which I guess it would be, in context, but still).