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

Re: [PATCH] portable mechanism to determine noatime



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



Messages sorted by: Reverse Date, Date, Thread, Author