From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26704 invoked by alias); 30 Dec 2015 17:55:59 -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: 37453 Received: (qmail 11373 invoked from network); 30 Dec 2015 17:55:57 -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,FREEMAIL_FROM, T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.uk; s=s2048; t=1451497746; bh=PAr7eCyMcHUuaTUnYlg/3IZvUT4s4HrTUM/5lMUM9Io=; h=In-reply-to:From:References:To:Subject:Date:From:Subject; b=OXoYQh6hMU9RPTUPTbhn+rAqlVXXCH204b8rt5DCCdHDjftRwzXA35MmPhGD0h0A/pXdD00l0M/T3eL/Fm1Bo0tqyXQLnGuzCEeVGtyEi1UH9eocs3oIuNNo+G1xid9Ws8z75kX1AuAd7f5kMOENfRjMGkudV03B9gc4LCaKxhwyiqrHNzJDS22k5L+BPYzBEDLJOA9UIFavJvj9SLp0OJlqiSWtgWHD3vZcK/+KgF1DpaIwOJTsq7gpW9Odbq6rLN68Dhi3BEYksQ7LZRL7kHBKbyWuFHxHPf5zFebVPyl3fq6OA2YyDo5vVd2ypyW79e+WDb5sy7nsFHOFZiqQyw== X-Yahoo-Newman-Id: 393584.57342.bm@smtp111.mail.ir2.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: lD.WoXAVM1mlAqzzRwft244vWj.NOgE93dYrjqzhW2iwGcT bBlJ0RIvko7ShcgH4w3egc4s9eQnyQjHJjmRX4.HGplDdkD906gr1iWqQmjK q23VDxjXFxSyX5lPQ2ISBEfhbLwX0mGBta2_Iykd3bZq70dtsuwA2U018S9L r9_kns6ltyaQm6OioeQ19vfoBGISeNmm76Sf2HZZH72MKt6CocI6J4KewzOS sxSYQl_six2MUhR0knTcc4S.83oqO_5wSrNPmIEJwoACZY.TM7w1oXrBIWWM p.xauDfreOWYorfAtq_c2U2FzDYKMkl87yZpPJSfZhweMkccPIqRrAcoWxeB 7.PhAl9piAFObClcG40B20I9R9Ky5_E1cRmGN5Tpr6llMRBFacu2nnmBOG3A wf9MATMdpDzgim3eF6Ori9pi9m2avQ31Zi8S6zyF.ftM.WEbgMpR196v4Ywt XHCZJw3pJny.KGiOE.DmdwP_Ch4Ft6Rj5zLlIbs_.PPwNrzeM_647R7S37x2 w_4x5Qlspvg3R0WZ_dMttfn4aoFxwyRdP X-Yahoo-SMTP: opAkk_CswBAce_kJ3nIPlH80cJI- In-reply-to: <26916.1449972782@thecus.kiddle.eu> From: Oliver Kiddle 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> <151211224922.ZM4583@torch.brasslantern.com> <26916.1449972782@thecus.kiddle.eu> To: zsh-workers@zsh.org Subject: Re: [PATCH] portable mechanism to determine noatime MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <19178.1451497745.1@thecus.kiddle.eu> Date: Wed, 30 Dec 2015 18:49:05 +0100 Message-ID: <19179.1451497745@thecus.kiddle.eu> On 13 Dec, I wrote: > df is adjusting the > column widths according to maximum lengths of fields. That ends up > varying between the one fs run and the multple fs run of df. That can be > solved by piping to tr -s ' ' or wrapping it in ${=...}. So is there any advance on the patch below or shall I commit it in this form? Oliver diff --git a/Test/C02cond.ztst b/Test/C02cond.ztst index 9e13696..0b4608a 100644 --- a/Test/C02cond.ztst +++ b/Test/C02cond.ztst @@ -154,7 +154,7 @@ ZTST_skip="[[ -N file ]] not supported on Cygwin" elif (( isnfs )); then ZTST_skip="[[ -N file ]] not supported with NFS" - elif test -f /etc/mtab && { grep $(df . 2>/dev/null| tail -n1 | awk '{print $1}') /etc/mtab | grep -q noatime; }; then + elif { df -k -- ${$({mount || /sbin/mount} | awk '/noatime/ {print $1,$3}'):-""} | tr -s ' ' | fgrep "$(df -k . | tail -1 | tr -s ' ')" } >&/dev/null; then ZTST_skip="[[ -N file ]] not supported with noatime file system" else [[ -N $newnewnew && ! -N $unmodified ]]