zsh-workers
 help / color / mirror / code / Atom feed
From: Oliver Kiddle <okiddle@yahoo.co.uk>
To: zsh-workers@zsh.org
Subject: Re: [PATCH] portable mechanism to determine noatime
Date: Sun, 13 Dec 2015 03:13:02 +0100	[thread overview]
Message-ID: <26916.1449972782@thecus.kiddle.eu> (raw)
In-Reply-To: <151211224922.ZM4583@torch.brasslantern.com>

Bart wrote:

> Searching for a full line rather than only for one word avoids the btrfs
> issue you mentioned, among other things.

I was concerned that the reported sizes mightn't be identical between
two runs of df. On testing this difference, I'm finding that the df
output isn't matching but for a different reason. 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 ${=...}.

There are also cases where after a particularly long device, df outputs
a newline so one entry is split over two lines. Solaris is clever enough
not to do this when outputting to a pipe but it occurs on at least Linux.
In practice, I don't think this matters because it will occur for both
the df runs and the last line is sufficient for fgrep.

> 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).

Each was necessary for silencing something or other but I agree that
putting everything in braces and having a single redirection is better.

Oliver


  reply	other threads:[~2015-12-13  2:19 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-04 23:22 Baptiste Daroussin
2015-12-05  5:15 ` Eric Cook
2015-12-05 18:17   ` Eric Cook
2015-12-05 20:00     ` Matthew Martin
2015-12-06  1:25       ` Oliver Kiddle
2015-12-10  8:48         ` Bart Schaefer
2015-12-10  8:55           ` Bart Schaefer
2015-12-11  4:21             ` Oliver Kiddle
2015-12-12  6:49               ` Bart Schaefer
2015-12-13  2:13                 ` Oliver Kiddle [this message]
2015-12-13 16:22                   ` Bart Schaefer
2015-12-18  2:45                     ` Oliver Kiddle
2015-12-18  4:40                       ` Bart Schaefer
2015-12-30 17:49                   ` Oliver Kiddle
2015-12-30 22:43                     ` Bart Schaefer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=26916.1449972782@thecus.kiddle.eu \
    --to=okiddle@yahoo.co.uk \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).