Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: zsh/stat: output file birth time under Linux
- X-seq: zsh-workers 49081
- From: Stephane Chazelas <stephane@xxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: zsh/stat: output file birth time under Linux
- Date: Mon, 14 Jun 2021 21:05:10 +0100
- Archived-at: <https://zsh.org/workers/49081>
- In-reply-to: <YMek63ecXS2A266/@fullerene.field.pennock-tech.net>
- List-id: <zsh-workers.zsh.org>
- Mail-followup-to: zsh-workers@xxxxxxx
- References: <20210614120903.GA3136251@cventin.lip.ens-lyon.fr> <YMek63ecXS2A266/@fullerene.field.pennock-tech.net>
2021-06-14 14:50:19 -0400, Phil Pennock:
[...]
> I think the tricky decision is what to do about setting an numerically
> indexed array instead of printing or setting an associative array.
[...]
I agree. There's a risk users do things like:
zstat -nLA a -- *
printf 'File: %s\n dev: %s...\n target: %15$s\n' "$a[@]"
Or
while (( $#a )); do
print -r -- $a[1] $a[4] ...
shift 15 a
done
(though in practice those behave poorly when any of the
(l)stat()s fails, so users would be more likely to run zstat in
a loop).
Or:
zstat -LA s link
print -r target: $s[-1]
--
Stephane
Messages sorted by:
Reverse Date,
Date,
Thread,
Author