building old coreutils versions on new glibc systems

2019-08-01 Thread Assaf Gordon
Hello, While trying to find out the first version with the 'seq' bug (my previous email), I realized it has become quite hard to build old coreutils version on newer glibc system. In particular: 1. At some point 'gets' was removed from glibc, but old sources refer it. 2. Older gnulib used interna

seq: fix bug of printing extra line

2019-08-01 Thread Assaf Gordon
Hello, Prompted by the recent 'seq' thread, I spotted a bug in seq. Fix attached. I think it does not introduce any regressions, but review and comments are very welcomed. -assaf >From 52505fe73fb00a30435009895d03fa3bba1297a4 Mon Sep 17 00:00:00 2001 From: Assaf Gordon Date: Thu, 1 Aug 2019 17:0

Re: Can -f of seq take an integer format?

2019-08-01 Thread Stephane Chazelas
2019-08-01 14:35:32 -0600, Assaf Gordon: [...] > FORMAT must be suitable for printing one argument of type 'double'; > it defaults to %.PRECf if FIRST, INCREMENT, and LAST are all fixed > point decimal numbers with maximum precision PREC, and to %g > otherwise. > > This makes it clear that

Re: Can -f of seq take an integer format?

2019-08-01 Thread Assaf Gordon
Hello, On 2019-08-01 2:07 p.m., Peng Yu wrote: I only find %.0f to print integers. But it is just a float with no digits after the point. Is there a real integer format in seq? Thanks. Please read the manual, or at least the "--help" screen: $ seq --help [...] -f, --format=FORMAT

Can -f of seq take an integer format?

2019-08-01 Thread Peng Yu
Hi, I only find %.0f to print integers. But it is just a float with no digits after the point. Is there a real integer format in seq? Thanks. $ seq -f '%.0f minutes' 2563199 2563200 2563199 minutes 2563200 minutes $ seq -f '%g minutes' 2563199 2563200 2.5632e+06 minutes 2.5632e+06 minutes 2.5632e

Re: How to convert a md5sum back to a timestamp?

2019-08-01 Thread Kaz Kylheku (Coreutils)
On 2019-07-31 20:36, Peng Yu wrote: Hi, Suppose that I know a md5sum that is derived one of the timestamps computed below. Is there a way to quickly derive what the original timestamp is? I could make a database of all the timestamps and their md5sums. But as the total number of entries increase

Re: How to convert a md5sum back to a timestamp?

2019-08-01 Thread Victor Ananjevsky
Use unix time instead of md5sum В Wed, 31 Jul 2019 22:36:18 -0500 Peng Yu писал: > Hi, > > Suppose that I know a md5sum that is derived one of the timestamps > computed below. Is there a way to quickly derive what the original > timestamp is? I could make a database of all the timestamps and th

Re: date: new options to parse input date with strptime(3)

2019-08-01 Thread Stephane Chazelas
2019-08-01 03:24:29 -0600, Assaf Gordon: [...] > > > I like this, and think it's useful functionality. > > > It's equivalent to -f in date(1) on FreeBSD, > > > so we should probably support that short option > > [...] > > > > Note that busybox date has -D for that. > > In gnu date(1), -f is alrea

Re: How to convert a md5sum back to a timestamp?

2019-08-01 Thread Stephane Chazelas
2019-08-01 02:08:59 -0600, Assaf Gordon: [...] > Three notes: > 1. > I would recommend using "-%7.0f minutes" format in "seq" > instead of "%g", as the latter will result in a scientific notation > for large values: > >$ seq -f '-%7g minutes' 2563200 | tail -n1 >-2.5632e+06 minutes > >

Re: date: new options to parse input date with strptime(3)

2019-08-01 Thread Assaf Gordon
Hello, Thank you for the review. (replying to both emails together) On Wed, Jul 31, 2019 at 04:27:20PM +0100, Stephane Chazelas wrote: > 2019-07-31 14:59:42 +0100, Pádraig Brady: > > On 26/07/19 08:29, Assaf Gordon wrote: > [...] > > > The first patch adds '--date-format=FORMAT', where FORMAT is

Re: How to convert a md5sum back to a timestamp?

2019-08-01 Thread Assaf Gordon
Hello, On 2019-08-01 12:50 a.m., Stephane Chazelas wrote: 2019-07-31 22:36:18 -0500, Peng Yu: Suppose that I know a md5sum that is derived one of the timestamps computed below. Is there a way to quickly derive what the original timestamp is? I could make a database of all the timestamps and t