>>>>> "PE" == Paul Eggert writes:
PE> On 12/12/21 07:27, 積丹尼 Dan Jacobson wrote:
>> Also mention something about how to get the full timezone name.
PE> Unfortunately at the coreutils level that information is not available
PE> in any portable or reliable w
On (info "(coreutils) Time conversion specifiers")
‘%Z’
alphabetic time zone abbreviation (e.g., ‘EDT’), or nothing if no
time zone is determinable. See ‘%z’ for how it is determined.
Also mention something about how to get the full timezone name.
E.g., show instead of CST: Central St
On the 'date' man and info pages,
SYNOPSIS
date [OPTION]... [+FORMAT]
date [-u|--utc|--universal] [MMDDhhmm[[CC]YY][.ss]]
Synopses:
date [OPTION]... [+FORMAT]
date [-u|--utc|--universal] [ MMDDhhmm[[CC]YY][.ss] ]
please break these down into:
printing the date:
da
What a headache.
"Six months ago" means slightly different things to cpio and ls.
And ls documents do say exactly what,
and cpio documents don't even say six months.
$ cat prover
set -eu
cd /tmp
for i in `seq 170 190`
do
touch -d "$i days ago" x
{
env - ls -l x|tr -s ' '
ls
(info "(coreutils) tr invocation")
all the options don't appear together on the same page.
Only the man page's DESCRIPTION has them all together.
(info "(coreutils) Differences from the official Debian Algorithm") and
(info "(coreutils) Minus/Hyphen and Colon characters")
could mention workarounds, so one could indeed achieve the Debian
Algorithm.
Or mention the only way is to use
dpkg --compare-versions
(on pairs only.)
(info "(coreutils) tr invocation") says
Currently ‘tr’ fully supports only single-byte characters.
Eventually it will support multibyte characters; when it does, the ‘-C’
And the man page has no warning at all. #BUG. Please add one.
BTW,
$ echo 哇|tr 哇 123
123
It works fine! (People will t
Let's face it, sort, no matter what --option, or LC_... value,
just can't achieve this order:
3-1號邊
3號之1
3號之2
30
What's the miracle kid (me) doing right that sort(1) just can't sort
out yet?
Mom told me "Just sort by numbers."
See https://www.jidanni.org/geo/house_numbering/sorting/ in your spa
On (info "(coreutils) seq invocation") we read
Be careful when using ‘seq’ with outlandish values: otherwise you
may...
Here's another 'fun/sad/DDOS yourself' example you might add:
One day I wrote a Makefile,
m:
seq 0 9|sed s/$$/號.html/|xargs make
but before using it, I though I'll
(info "(coreutils) Correct/Incorrect ordering and Expected/Unexpected results")
needs to "admit" or "at least mention" that "coreutils just hasn't thought
about FULLWIDTH
DIGITs yet." I.e., Europeans are in luck. East Asians are out of luck.
$ seq 9 11|sort
10
11
9
$ seq 9 11|sort -n
9
10
11
$ se
(info "(coreutils) Backup options") is great, except,
it needs examples of how one can preserve file extension with it.
E.g., x.jpg~ messes up plenty of viewers, but x~.jpg is fine.
Same with numbered backups.
So the page should discuss this problem, and mention workarounds.
man ln says:
-r, --relative
create symbolic links relative to link location
-s, --symbolic
make symbolic links instead of hard links
Does -s need -r,
or -r need -s?
Hard to tell from the man page.
Had to find out the 'hard' way.
Please mention the a
Man wc says
Print newline, word, and byte counts for each FILE, and a total line if
more than one FILE is specified. A word is a non-zero-length sequence
of characters delimited by white space.
first you are talking about bytes, then you are talking about
characters.
So fo
$ ln -rbsv ~/Downloads/*/95*[0-9].jpg xiangpianjibentu
'xiangpianjibentu/95212025.jpg' ->
'../../../../Downloads/ViewLarge_Draw_files/95212025.jpg'
'xiangpianjibentu/95212033.jpg' ->
'../../../../Downloads/ViecccwLarge_Draw_files/95212033.jpg'
'xiangpianjibentu/95212025.jpg~' ~ 'xiangpianjibe
All I am saying is 'to acknowledge the hazards'... 'Advisory on
prolonged use'. 'Note about health effects of unattended use.'
For all the user knows reading
(info "(coreutils) Backup options")
maybe numbered backups even just means one backup, numbered ...1.
> "CE" == Chris Elvidge writes:
CE> So 'use common sense to limit disk space used' has to be stated in the
CE> manual?
Hmmm, yes.
And also mention in the manual that e.g., emacs has methods to trim
these automatically, but coreutils hasn't implemented them yet.
Else users will write elabora
wc needs a --verbose option. Else one is forced to do:
$ file=e.html; echo $file:; for i in bytes chars lines words; do echo -en
$i:\\t; wc --$i < $file; done
e.html:
bytes: 31655
chars: 29141
lines: 643
words: 1275
I mean sometimes we want to send the output to a real person, and
currently
> "PE" == Paul Eggert writes:
PE> That argument would apply to any program, no? "cat", "diff", "sh",
PE> "node",
PE> Not sure why "ls" needs a convenience flag that would complicate the
PE> documentation and maintenance and be so rarely useful.
OK, then I'll close the bug then.
E.g.,
"What is API pagination? Some APIs, such as Contacts can return millions
of results. We obviously can't return all of them at once, so we need to
return a subset - or a page - at a time. This technique is called paging
and is common to most APIs. Paging can be implemented in many different
wa
Sure, it is against the https://en.wikipedia.org/wiki/Unix_philosophy, but
just like SQL has LIMIT,
and
$ unicode --help
-m MAXCOUNT, --max=MAXCOUNT
Maximal number of codepoints to display...
Just like "we want to stop pollution at the source", not always "clean up after
I hereby propose "ls --limit=..."
$ ls --limit=1 # Would only print one result item:
A
You might say:
"Jacobson, just use "ls|sed q". Closed: Worksforme."
Ah, but I am talking about items, not lines:
$ ls
A B C D
E F G H
I J K L
$ ls -C|sed 2q
A B C D
E F G H
$ ls -C --limit=2
A
On (info "(coreutils) fold invocation") warn that fold will wreck UTF-8
files, shattering any multibyte character that unfortunately lies near
its chopper.
(GNU coreutils) 8.32
Well OK, but when and when not to use the "=" is not revealed by the
otherwise detailed error messages. So unless the user checks the manual,
they will never "get it".
date +%Y-%m-%dT%H:%M:%S%z
^I meant %:z
> Then one needn't use trial and error
(Driving my point home.)
I got this brilliant idea.
Let's say one likes the output of
$ date --iso-8601=seconds
2020-11-30T21:15:47+08:00
but wants to know "how you did it?"
Hmmm, no assistance from
$ date --iso-8601=seconds --debug
2020-11-30T21:15:50+08:00
Ah, if only there were a:
$ date --iso-8601=seconds --expose-
$ date -I=seconds
date: invalid argument ‘=seconds’ for ‘--iso-8601’
Hey, that is a valid argument for --iso-8601. (But not for -I, so say
that instead.)
Here is a real invalid argument:
$ date --iso-8601=secondsz
date: invalid argument ‘secondsz’ for ‘--iso-8601’
date (GNU coreutils) 8.32
Maybe print warning messages when encountering the dot,
(info "(coreutils) chown invocation")
Else Grandpa won't ever know,
https://github.com/scop/bash-completion/issues/468
until one day when it's too late...
(And his program starts messing things up on some other system.)
(info "(coreutils) nl invocation") says
‘pBRE’
number only lines that contain a match for the basic regular
expression BRE. *Note Regular Expressions: (grep)Regular
Expressions.
OK, but add a new functionality:
‘PBRE’
Do NOT number lines that cont
https://www.gnu.org/software/coreutils/ mentions coreut...@gnu.org and
bug-coreutils@gnu.org (and the term mailing list and the term bug tracker
many times, all intertwined and perhaps repeating.)
Maybe only mention each one once, with a description of what they are
below it.
So that would be a t
(info "(coreutils) sort invocation")
should mention how to sort via absolute value,
or add an option to do it.
Currently one must use e.g.,
$ seq -2 2|perl -pe 's/^(-)(.*)/$2$1/;' | sort -n
0
1
1-
2
2-
date(1) should add "Julian day number" or the "Astronomical day
number" (see (info "(emacs) Calendar Systems") output format.
Else for crontab(5) one must do
# Run once per 48 hours (every other day), even across week, month, and
year boundaries:
33 22 * * * expr $(date +\%s) /
(info "(coreutils) stat invocation") says,
• %a - Access rights in octal (note ‘#’ and ‘0’ printf flags)
• %A - Access rights in human readable form
But man find says,
-perm mode
File's permission bits are exactly mode (octal or symbolic).
Since an exact match is requi
(info "(coreutils) uniq invocation") says
An exit status of zero indicates success, and a nonzero value
indicates failure.
The user wonders:
"Failure to make a file unique because it was already unique?"
Be more explicit.
date -d should add a way to say "next feb 11" or "next 2/11" etc.
E.g., at(1) knows we are always talking about the coming Feb. 11,
and not the one that has already passed in the current year.
Just like we can say "next Friday" and "last Friday" currently.
> "PE" == Paul Eggert writes:
PE> On 6/17/19 8:12 AM, Pádraig Brady wrote:
PE> I prefer the current ("maddening") behavior, as it gives the reader a
PE> useful signal that the user is numeric rather than textual. This is
PE> particularly important when a user name consists entirely of digits,
> "PB" == Pádraig Brady writes:
PB> to know if it was a common issue, as I've not encountered it at least.
Well as the anbox Android emulator could possibly become very popular,
ls should be ready for a big influx of numeric ids.
> "EB" == Eric Blake writes:
EB> No need to open a second bug to tell us that the first was not a problem
EB> after all. I'm merging the two bugs in the database, and marking the
EB> issue closed.
It takes several minutes before the bug number is created, so there is a
tradeoff between proper
Oh, I see, it is mentioned above it.
Sure wish "(see above)" was there.
On (info "(coreutils) cut invocation")
with no examples for
‘-f FIELD-LIST’
‘--fields=FIELD-LIST’
Select for printing only the fields listed in FIELD-LIST. Fields
are separated by a TAB character by default. Also print any line
that contains no delimiter character,
Well all I know is e.g., perl's man perlrecharclass is
more detailed than
(info "(coreutils) Character sets") section,
(which (info "(coreutils) sort invocation") perhaps should also link to.)
Anyways, coreutils should at least link to a definite statement...
On (info "(coreutils) cp invocation") at
‘-l’
‘--link’
Make hard links instead of copies of non-directories.
Mention
"Exactly equivalent to ln."
or
"cp -l a b is exactly equivalent to ln a b."
Or if not, mention why.
(info "(coreutils) sort invocation") says
‘-i’
‘--ignore-nonprinting’
Ignore nonprinting characters. The ‘LC_CTYPE’ locale determines
character types...
Well this leaves the user high and dry trying to figure out what you
mean by printing characters.
Is SPC a printing character he won
All the other utilities respect the environment variable ‘TIME_STYLE’,
except date(1) itself! Date should be no different...
Say, rm, cp, mv have --verbose.
How about for touch too?
Then one wouldn't need
$ set -x; touch /tmp/{a,b,c}.el; set +x
+ touch /tmp/a.el /tmp/b.el /tmp/c.el
to see what it was touching or not.
> "LSS" == Leslie S Satenstein writes:
LSS> Did you consider that more than one terminal can be open, and at the
LSS> second terminal, "b" could be renamed before replying to the mv
LSS> command?
I don't know about all that. Let's hope the designers consider all aspects.
$ mv a b
mv: overwrite 'b'? y
mv: cannot overwrite non-directory 'b' with directory 'a'
User thinks well why didn't you check before uselessly asking me?
Full story:
$ mkdir a
$ touch b
mv: overwrite 'b'? y
mv: cannot overwrite non-directory 'b' with directory 'a'
$ \mv a b
mv: cannot overwrite n
Well
> Print newline, word, and byte counts
might sound like
> Play movies, audio files, and even ...
Sort of like a list of capabilities.
> "PB" == Pádraig Brady writes:
PB> I'm confused. It says 'bytes', and means it.
PB> One has to specify -m to select characters.
But OK, fine.
I can do
$ sleep infinity
so why not
$ seq infinity
also?
$ man sleep | grep -ic infinity
0
$ sleep --help | grep -ic infinity
0
$ info sleep | grep -ic infinity
0
$ /bin/sleep infinity #But it still works, so please document it.
INFO says
By default, ‘wc’ prints three counts: the newline, words, and byte
and wc --help even more so.
Alas man wc doesn't say if what we are looking at is bytes or
characters, so kindly mention the default on the man page!
Thanks for working on this guys, hopefully users will one day no longer
be faced with (yes, seemingly) random errors.
$ ls -l | sed 2!d
drwxr-xr-x 14 jidanni jidanni 4096 2016-12-24 AndroidMisc
$ ls -l | sed 2q
total 157780
drwxr-xr-x 14 jidanni jidanni 4096 2016-12-24 AndroidMisc
ls: w
> "PB" == Pádraig Brady writes:
PB> Fair point. I'm thinking of this extra qualification:
PB> sort: text ordering performed using ‘en_IE.UTF-8’ sorting rules
Maybe say 'LC_CTYPE=en_IE.UTF-8'
sorting rules
PB> sort: text ordering performed usi
(I recall I heard about 50 years ago when pipe buffers first came to
Unix they were supposed to be invisible to the user...)
By the way
https://lists.gnu.org/archive/html/bug-bash/2019-02/msg00052.html
says "... contradictory description in the coreutils info document."
> "EB" == Eric Blake writes:
>> And no fair saying "just save the output" (could be big) "into a file
>> first, and do head(1) or sed(1) on that."
EB> If you have an app that exits noisily on write failures to an early-exit
EB> pipe, your solutions are to quit ignoring SIGPIPE, or to change
Can you please have assure the user in that message it makes
that it has indeed seen his -n/--numeric-sort.
$ sort --debug
sort: using simple byte comparison
$ sort --debug --numeric-sort
sort: using simple byte comparison
unchanged. User gets nervous.
sort (GNU coreutils)
> "AG" == Assaf Gordon writes:
AG> The errors are not "random" - they happen because you explicitly
AG> cut short the output of a program.
Well the user thinks "hey I cut short 5 lines, 45 lines, 495 lines, and
then one I got a job at a big company and cut short 4995 lines and got
this error
Things start out cheery, but quickly get ugly,
$ for i in 9 99 999 9; do seq $i|sort -n|sed 5q|wc -l; done
5
5
5
5
sort: write failed: 'standard output': Broken pipe
sort: write error
5
sort: write failed: 'standard output': Broken pipe
sort: write error
Therefore, kindly add a sort --li
First, on the test(1) man page, at
EXPRESSION1 -a EXPRESSION2
both EXPRESSION1 and EXPRESSION2 are true
EXPRESSION1 -o EXPRESSION2
either EXPRESSION1 or EXPRESSION2 is true
Say instead
EXPRESSION1 -a EXPRESSION2
both EXPRESSION1 a
(info "(coreutils) comm invocation")
"Before ‘comm’ can be used, the input files must be sorted"
"If an input file is diagnosed as being unsorted, the ‘comm’ command
will exit with a nonzero status (and the output should not be used).
Yes do warn in the manual, as here root (so no $HOME) expected tilde
expansion... Thanks.
On (info "(coreutils) Common options")
mention that, though clearer, long options aren't always as good as short
options,
$ touch --reference=~jidanni/.pcmanx /cf/pcmanx_time
touch: failed to get attributes of '~jidanni/.pcmanx/pcmanx': No such file or
directory
Unless one removes the '=':
$ touc
On man mkdir
-m, --mode=MODE
set file mode (as in chmod), not a=rwx - umask
-p, --parents
no error if existing, make parent directories as needed
do warn that --mode doesn't affect any parents created.
$ mkdir --mode 700 -p /tmp/g/h/i
$ find /tmp/g -ls
Maybe it should try to pass on to the user at least an error code:
Invalid date: error code 0754,
or even better, an mention of what error it hit.
> "AG" == Assaf Gordon writes:
AG> (It doesn't deal with "why", that is left to the users to decide when
AG> they need it, but it shows clear examples of how to use it).
Maybe add "For example, you might want to hear your songs in a fresh fun
order. Or make sure your program still works even
Fine. Put a message on top of (info "(coreutils) ls invocation")
saying that your pipes are better.
Are you saying you want to enhance find(1) to sort its output?
Don't let that ls colors stuff fool you. It originally didn't have that.
(Probably The Unix Programming Environment by K & P.)
Bob, I remember from my K&R Unix book that ls can be used in scripts.
In fact that is why
$ ls
acts different than
$ ls | cat
Plus there are lots of things ls can do that find cannot.
For instance sorting.
How are you going to do
$ ls -t
with find?
For files with blanks in their names,
one shouldn't need this workaround:
$ ls -t | tr \\n \\0 | xargs -0 more > /tmp/z.txt
Please add a --print0 option. like find(1) has.
ls (GNU coreutils) 8.30
Good! You need to then tie all the documentation you found, into the
coreutils documentation, as the official declaration of what you mean.
Just like "man perlrecharclass - Perl Regular Expression Character
Classes" does. I mean one cannot just hope the user will "Google" and
then land on "Wikipedi
Yes but every program has slightly different sets of non-printing
characters, so they need to list them exactly.
(Today on Debian I see
$ who
jidanni pts/02018-10-25 06:26 (:0)
So maybe this is fixed.)
As you can see, the Subject got damaged somehow when sending this
message to me.
(Subject: Re: bug#18479 acknowledged by developer ())
> "GbTS" == GNU bug Tracking System writes:
GbTS> This is an automatic notification regarding your bug report
GbTS> #18479: date -d 'today - month',
GbTS> wh
Say, can we get the final information just from this email next time,
just like in Debian. Where one doesn't need to click on the link to see
how the bug was solved.
> "GbTS" == GNU bug Tracking System writes:
GbTS> This is an automatic notification regarding your bug report
GbTS> #14971: sp
AG> I hope to get to this bug soon.
Good.
On (info "(coreutils) sort invocation")
‘-R’
‘--random-sort’
‘--sort=random’
Sort by hashing the input keys and then sorting the hash values.
Choose the hash function at random, ensuring that it is free of
collisions so that differing keys have differing hash values. This
is l
(info "(coreutils) Sorting the output") says
‘-r’
‘--reverse’
Reverse whatever the sorting method is—e.g., list files in reverse
alphabetical order, youngest first, smallest first, or whatever.
OK but mention 'whatever' doesn't mean -U, -f, because they are sorted
in "unsorted" order. I
OK. Please on (info "(coreutils) cp invocation") at
‘-v’
‘--verbose’
Print the name of each file before copying it.
add:
"(Note this reveals internal order of operations, often in ls -U order,
thus occasionally appearing to be in ls, ls -t, ls -r, ls -rt etc. order.)"
(I mean on the same pag
OK maybe I was just looking at the latter half of
$ sh O
/tmp
created directory '/var/tmp/y'
copied 'x/1' -> '/var/tmp/y/1'
copied 'x/2' -> '/var/tmp/y/2'
copied 'x/3' -> '/var/tmp/y/3'
copied 'x/4' -> '/var/tmp/y/4'
copied 'x/5' -> '/var/tmp/y/5'
copied 'x/6' -> '/var/tmp/y/6'
copied 'x/7' -> '/v
$ mv -v dir1/* dir2
reveals that mv works backwards,
copying in ls -r order.
Well OK, but why is that order better than the order of the arguments it
was given?
> "EB" == Eric Blake writes:
EB> Let's step back a bit. We recommend that you NEVER parse ls output, as
No problem. Any example of what can't be parsed would be fine. Even e.g.,
EB> Eric Blake, Principal Software Engineer
EB> Red Hat, Inc. +1-919-301-3266
EB> Virtualization: qemu
On (info "(coreutils) cut invocation")
‘-d INPUT_DELIM_BYTE’
‘--delimiter=INPUT_DELIM_BYTE’
With ‘-f’, use the first byte of INPUT_DELIM_BYTE as the input
fields separator (default is TAB).
please mention there is no way to indicate more than one character,
thus no way to process
$ ls -
< P.S., Yes indeed I had LC_COLLATE=C so maybe --debug should mention
< where in the environment it made it choices from too.
Ah, like you said
$ LC_ALL=en_CA.UTF-8 sort --debug < /dev/null
sort: using ‘en_CA.UTF-8’ sorting rules
$ LC_ALL=C sort --debug < /dev/null
sort: using simple byt
Your answer is absolutely pure gold for a new page linked from
‘--debug’
Highlight the portion of each line used for sorting. Also issue
warnings about questionable usage to stderr.
in the Info manual! Please don't let it go to waste sitting in the bug
tracker. Perhaps call it Debuggin
On (info "(coreutils) Access permission tests")
don't say
‘-r FILE’
True if FILE exists and read permission is granted.
‘-w FILE’
True if FILE exists and write permission is granted.
‘-x FILE’
True if FILE exists and execute permission is granted (or search
permission, if it i
In (info "(coreutils) Character sets")
‘\OOO’
The 8-bit character with the value given by OOO, which is 1 to
3 octal digits. Note that ‘\400’ is interpreted as the
two-byte sequence, ‘\040’ ‘0’.
OK but do add hex too. Hmm, I probably reported this before but ca
In (info "(coreutils) Character sets")
‘\OOO’
The 8-bit character with the value given by OOO, which is 1 to
3 octal digits. Note that ‘\400’ is interpreted as the
two-byte sequence, ‘\040’ ‘0’.
It is very important to also add here:
and \0377 is int
I got an idea.
Please parse "one", "two", "three" (lower and upper case folded too.)
1. Because it is proper English. "1 day ago" is cellphone English.
2. Because there can't be that many of them... (seventy-three,
seventy-four... well they are made up of other components...)
3. Because it will
I don't think you guys should invent new eye-catching strings.
Aren't there already standard ways to show what is going on under the
hood? Let's see, sh -x uses + and ++... strace uses... maybe just use '# '
comments.
I'm fine with whatever you guys come up with, just don't
R> - Leave the output like it was initially.
else I'll just be back here five years later after forgetting the whole episode.
PB> So this is working across file systems
Yes.
>> '/home/jidanni/jidanni.org/location/grow/programs' -> '/tmp/programs'
This says to me "I, the mv command, have just moved A to B.
PB> create dir /tmp/programs
If that (create B) is what it is doing in that step, then it should not
mention the unr
I do
mv -v /home/jidanni/jidanni.org/location/grow/programs /tmp
and see
'/home/jidanni/jidanni.org/location/grow/programs' -> '/tmp/programs'
'/home/jidanni/jidanni.org/location/grow/programs/grow.tgz' ->
'/tmp/programs/grow.tgz'
removed '/home/jidanni/jidanni.org/location/grow/programs/grow.tgz'
Can you please don't say "invalid date" for everything invalid.
$ date -d @1494439601675485
date: invalid date ‘@1494439601675485’
$ date -d 1494439601675485sec
date: invalid date ‘1494439601675485sec’
$ date -d 1494439601675485seconds
date: invalid date ‘1494439601675485seconds’
$ date -d @149443
$ tr -s x -d '\\'
tr: extra operand ‘’
Try 'tr --help' for more information.
I only gave '\\'.
I can't really tell, but it seems at the beginning there still lacks the
most basic "Hi kids, here is the 'join' command. It takes one file with
contents ... and and another file with contents ... and outputs ..."
before you get into any more niceties.
In (info "(coreutils) join invocation")
‘-a FILE-NUMBER’
Print a line for each unpairable line in file FILE-NUMBER (either
‘1’ or ‘2’), in addition to the normal output.
OK but say if we can use both: -a 1 -a 2? (Answer: yes)
And if so how to tell which lines are from which file (Answer
In (info "(coreutils) join invocation")
If the input has no unpairable lines, a GNU extension is available;
(shouldn't that ";" be ":"?)
the sort order can be any order that considers two fields to be equal if
and only if the sort comparison described above considers them to be
equal. For e
fold -s will break at spaces.
But why not let the user also pick an arbitrary character, other than
spaces, too?
1 - 100 of 157 matches
Mail list logo