Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH] portable mechanism to determine noatime
- X-seq: zsh-workers 37373
 
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
 
- To: zsh-workers@xxxxxxx
 
- Subject: Re: [PATCH] portable mechanism to determine noatime
 
- Date: Thu, 10 Dec 2015 00:48:23 -0800
 
- 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=rnd0iLXlZrSvuW0fwUskHpj29XxlgJE/1ZzozRCFNhs=;        b=km2wqb7MCu1sPLugabLcS8j7IDDh7s6Q4BZrX2BBTDS9ma0enpD3J3GegcfuJX4sCL         QBffKnoU3TxFNSi73bhOVuZoafNPWQmnPfQNd/ny+mgidBZ9jqY1OutBXjKypWbNnPxo         HmiqdHEMkKJJaAiT8uZEsKYdSGccN/agY54k5KDbIQb8kjO1iza0upAAjdyx2niu1rzH         QdCbwqCd3um0b7tnFVErpneKUt7Fbnb+kyjnch+Y4tJWEGco3bpXs+O+sgcwTTjtTVWv         o91bUxWL5PkK2IccRb8QFK+Aj36FYExZAHOn0C/rfLNWOD9/xxDjUq6yh9ePMM6IDEQW         XMLw==
 
- In-reply-to: <11850.1449365147@thecus.kiddle.eu>
 
- List-help: <mailto:zsh-workers-help@zsh.org>
 
- List-id: Zsh Workers List <zsh-workers.zsh.org>
 
- List-post: <mailto:zsh-workers@zsh.org>
 
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
 
- References: <CAPKC6oKUAu0LWzfWuaSbX3iQymhUmZg-35jf9SzrjMv4s=7HQA@mail.gmail.com> 	<566272DD.6010305@gmx.com>  <56632A3A.6000002@gmx.com> 	<CAGnh9tAC0G7iLenGYWHyJdLNa3VfWZRYQgBqePc=D-HgL3S8DQ@mail.gmail.com> 	<11850.1449365147@thecus.kiddle.eu>
 
On Dec 6,  2:25am, Oliver Kiddle wrote:
}
}   mount output has the filesystem in $1 and device in $3: opposite of Linux/BSD
}     - perhaps grep for the filesystem with a trailing space
I was thinking about this.  Couple of remarks/suggestions:
 - Why don't we grep "mount" output for "noatime" FIRST, and THEN test
   whether [[ $(df .) = $(df $atimeFS) ]] ?
 - Given that, maybe we don't need to care about $1 vs. $3.
Thus:
{ df $(mount || /sbin/mount | awk '/noatime/ {print $1, $3}') | fgrep "$(df .)" } >&/dev/null
Messages sorted by:
Reverse Date,
Date,
Thread,
Author