Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: [PATCH] portable mechanism to determine noatime



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