GNU bug report logs - #69636
Re: [PATCH] Improve quality of format-checking code for seq.

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: coreutils; Reported by: 877i7vyf3l.fsf@HIDDEN; Keywords: patch notabug; Done: Paul Eggert <eggert@HIDDEN>; Maintainer for coreutils is bug-coreutils@HIDDEN.
bug closed, send any further explanations to 69636 <at> debbugs.gnu.org and 877i7vyf3l.fsf@HIDDEN Request was from Paul Eggert <eggert@HIDDEN> to control <at> debbugs.gnu.org. Full text available.
Added tag(s) notabug. Request was from Paul Eggert <eggert@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 69636 <at> debbugs.gnu.org:


Received: (at 69636) by debbugs.gnu.org; 8 Mar 2024 19:14:43 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Mar 08 14:14:43 2024
Received: from localhost ([127.0.0.1]:59586 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rifg2-0000tX-TI
	for submit <at> debbugs.gnu.org; Fri, 08 Mar 2024 14:14:43 -0500
Received: from mail.cs.ucla.edu ([131.179.128.66]:36548)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eggert@HIDDEN>) id 1rifg0-0000tI-7J
 for 69636 <at> debbugs.gnu.org; Fri, 08 Mar 2024 14:14:41 -0500
Received: from localhost (localhost [127.0.0.1])
 by mail.cs.ucla.edu (Postfix) with ESMTP id 866743C00FABA;
 Fri,  8 Mar 2024 11:14:01 -0800 (PST)
Received: from mail.cs.ucla.edu ([127.0.0.1])
 by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavis, port 10032) with ESMTP
 id 7XqTGj7rb75M; Fri,  8 Mar 2024 11:14:01 -0800 (PST)
Received: from localhost (localhost [127.0.0.1])
 by mail.cs.ucla.edu (Postfix) with ESMTP id 3D7323C00F4E3;
 Fri,  8 Mar 2024 11:14:01 -0800 (PST)
DKIM-Filter: OpenDKIM Filter v2.10.3 mail.cs.ucla.edu 3D7323C00F4E3
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cs.ucla.edu;
 s=9D0B346E-2AEB-11ED-9476-E14B719DCE6C; t=1709925241;
 bh=HYJcuJ3T7nsKJwTR5KQTNvvL0qDnMBfbnsWq7BWIT0U=;
 h=Message-ID:Date:MIME-Version:To:From;
 b=Y4BrmvY2BsNEOZ7xcB/NydU23aosf+Xxt3Ura5ezmQ0wwa08qzVDKuSFek8paRiG0
 yA7g/WtvuW3RheKGkh/HzPIXAxMJpcUYlr60DhY/hZPU1gFcTcVe0Mg8sfXfIiHfbi
 FIO6909r0hNMHn/2zhDwf1Ku7gHIbcAZTdr1VIcTxBBMZMKZ8NWo8XmrhYVE/GvJAG
 yE7Z/vfOoUfNApm0Mm7Vx1JE35B9LEvzuq8NYcQzomhrt3ggDosnZ+ZmSu5kw5Nuyo
 9wAHQXmV21WZ+dFnhLGDfhcGgq7Q/630OB0bjOUP0N2l69ZK1xojIiZ4VcHY2Moow2
 EhFv6beNFtfpA==
X-Virus-Scanned: amavis at mail.cs.ucla.edu
Received: from mail.cs.ucla.edu ([127.0.0.1])
 by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavis, port 10026) with ESMTP
 id 8Bt8Y2BbOaMN; Fri,  8 Mar 2024 11:14:01 -0800 (PST)
Received: from [192.168.254.12] (unknown [47.148.192.211])
 by mail.cs.ucla.edu (Postfix) with ESMTPSA id 195963C00FABA;
 Fri,  8 Mar 2024 11:14:01 -0800 (PST)
Message-ID: <c2b8d400-8693-40f2-b324-646d7258b198@HIDDEN>
Date: Fri, 8 Mar 2024 11:14:00 -0800
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: bug#69636: Re: [PATCH] Improve quality of format-checking code
 for seq.
Content-Language: en-US
To: =?UTF-8?Q?P=C3=A1draig_Brady?= <P@HIDDEN>,
 877i7vyf3l.fsf@HIDDEN
References: <0e68f0b4-c48a-4d82-a407-b87b20570c49@HIDDEN>
 <c27203f4-1836-64b6-4342-7d4e6ab8a36f@HIDDEN>
From: Paul Eggert <eggert@HIDDEN>
Organization: UCLA Computer Science Department
In-Reply-To: <c27203f4-1836-64b6-4342-7d4e6ab8a36f@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 69636
Cc: 69636 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On 2024-03-08 05:47, P=C3=A1draig Brady wrote:

>  =C2=A0 seq $a | xargs printf -- 'x%.0s'
>=20
>  =C2=A0 printf "%${a}s" '' | tr ' ' x
>=20
>  =C2=A0 yes x | head -n$a | tr -d '\n'

Oh, I like those! Unfortunately the printf solution silently fails for=20
me when a=3D10000000000 due to a bug in Bash. Perhaps I'll get up the=20
energy to propose a fix (at least it should *noisily* fail :-).




Information forwarded to bug-coreutils@HIDDEN:
bug#69636; Package coreutils. Full text available.

Message received at 69636 <at> debbugs.gnu.org:


Received: (at 69636) by debbugs.gnu.org; 8 Mar 2024 13:49:05 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Mar 08 08:49:05 2024
Received: from localhost ([127.0.0.1]:57102 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1riaav-0007Fr-0o
	for submit <at> debbugs.gnu.org; Fri, 08 Mar 2024 08:49:05 -0500
Received: from mail-wm1-f42.google.com ([209.85.128.42]:61522)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <pixelbeat@HIDDEN>) id 1riaas-0007El-LO
 for 69636 <at> debbugs.gnu.org; Fri, 08 Mar 2024 08:49:03 -0500
Received: by mail-wm1-f42.google.com with SMTP id
 5b1f17b1804b1-412f62ee005so15618575e9.2
 for <69636 <at> debbugs.gnu.org>; Fri, 08 Mar 2024 05:48:30 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1709905645; x=1710510445; darn=debbugs.gnu.org;
 h=content-transfer-encoding:in-reply-to:from:references:cc:to
 :content-language:subject:user-agent:mime-version:date:message-id
 :sender:from:to:cc:subject:date:message-id:reply-to;
 bh=km8e2QnFR35Rf5/BGatRg3hGHnqV2ueEDLH+I2dvO1E=;
 b=VlbTDxRh3YnU5MqML6VJhcfwtilj3dDqPSDx3cSl+6U1A0UL8hN5mIp4xKDU6RGe3T
 vlyBlGpTXtKHQuef47p45dz4SDtmsolhnIOG1+KBm1SvnshEOCJ/l7rS8KFTCSl03tNZ
 LYEZ8KeTnR8peYS0dX+G8/lhW7ZzneUofx0E8DODw27ycAhr9YlGJhBTK/Wa0I++jL73
 hoEK1PIX/ncqxAEX9nnU390qykJcLFBVw/yoHYEYocJAUL6afje2UkJAxqfTS/xAndg/
 Ys65Ew1wbUvlszvs2oK2sjYhFWsZRprVo+GftyAgdIOg6cXr9FRKK7AjApHpg3UOJZH0
 DSKA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1709905645; x=1710510445;
 h=content-transfer-encoding:in-reply-to:from:references:cc:to
 :content-language:subject:user-agent:mime-version:date:message-id
 :sender:x-gm-message-state:from:to:cc:subject:date:message-id
 :reply-to;
 bh=km8e2QnFR35Rf5/BGatRg3hGHnqV2ueEDLH+I2dvO1E=;
 b=l7JzYKWD77dmdX5+IfOw2QJaGHzRVcadpbe2A6TPIxHKnSG9izwMZV6R+7pJqRVfBx
 2r94oIblIm6gLyBZq6WImlAJ8fPYCr7sdjBmvSYEtNPru1+ehKDT9YvpLj4F9eh6D9et
 g9X1PNzqLT07yiUV9ARrark2rlBecDm1+K8o/eJQs2ALKGkjYY2xmfqUaSpWDzfmZAqy
 m6g0/Qdt/ppM/LLT6uF/Hh0+NLgoZf4cpjXzSu3EfrKp71npcGgYsHNWovj1h2saLYHO
 S/Eq8vN2XbilFaBl64zhNayF1b/5jm2B3I0GS+DYfAJ1Vgufeh0mSDExvYojPGLlrXtR
 h/Dw==
X-Gm-Message-State: AOJu0YxMM+qMY+eTyIkyKw7+Ffr1J8u0UwreWrAWjcRlvxPfhxiMDznt
 9fvJkLBQUtHrYLu3mGjy1iKR7uBn24ZWKbIXNkJ5aFj+nxVsZHyexNGdMdzB
X-Google-Smtp-Source: AGHT+IHhtFzsfH/Gb1eV5W1xCWeOg4puAkqNKTs5uwYzbgzsJ8EyBhw8ZrlYBYjueP/D346vHKg44g==
X-Received: by 2002:a05:600c:3d99:b0:412:e848:85a1 with SMTP id
 bi25-20020a05600c3d9900b00412e84885a1mr9547707wmb.35.1709905644580; 
 Fri, 08 Mar 2024 05:47:24 -0800 (PST)
Received: from [192.168.1.17]
 (86-44-211-146-dynamic.agg2.lod.rsl-rtd.eircom.net. [86.44.211.146])
 by smtp.googlemail.com with ESMTPSA id
 fc20-20020a05600c525400b00412ae4b45b3sm5908039wmb.30.2024.03.08.05.47.23
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Fri, 08 Mar 2024 05:47:24 -0800 (PST)
Message-ID: <c27203f4-1836-64b6-4342-7d4e6ab8a36f@HIDDEN>
Date: Fri, 8 Mar 2024 13:47:21 +0000
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: bug#69636: Re: [PATCH] Improve quality of format-checking code
 for seq.
Content-Language: en-US
To: 877i7vyf3l.fsf@HIDDEN, eggert@HIDDEN
References: <0e68f0b4-c48a-4d82-a407-b87b20570c49@HIDDEN>
From: =?UTF-8?Q?P=C3=A1draig_Brady?= <P@HIDDEN>
In-Reply-To: <0e68f0b4-c48a-4d82-a407-b87b20570c49@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.2 (/)
X-Debbugs-Envelope-To: 69636
Cc: 69636 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.8 (/)

tag 69636 notabug
close 69636
stop

On 08/03/2024 12:29, User wrote:
> 
> Jim Meyering <jim@HIDDEN> wrote:
> 
>> Paul Eggert <eggert@HIDDEN> wrote:
>>> * src/seq.c (validate_format): Remove. Migrate its checks into...
>>> (long_double_format): Report an error and exit if an error is found,
>>> instead of returning NULL.  All callers changed.
>>> Use a more-consistent format for diagnostics.
>>> * tests/misc/seq: Adjust to the more-consistent format for diagnostics.
>>> ---
>>>    src/seq.c      |   71
>> +++++++++++++++----------------------------------------
>>>    tests/misc/seq |   10 ++++----
>>>    2 files changed, 25 insertions(+), 56 deletions(-)
>>
>> Thanks.
>> As far as I can see this is a "no semantic change"
>> patch (modulo diagnostics), and it looks fine, so I pushed it.
> 
> Dear Paul Eggert and Jim Meyering,
> 
> 
> Thank you very much for the contribution and care! I hope you have
> awesome and cozy day!
> 
> It is a nice addition to check the format in the most and explicitly
> safe cases, I believe, however it disallows to use it in cases when you
> need to just repeat a character without ANY processing directive! For
> example, `a=10; seq -f 'x' -s '' -- "$a";` would print 10 characters "x"
> without the check added prior and significantly (or little but still)
> support development in long codes which would require explicit loops or
> additional dependencies like awesome Perl.
> 
> Is it possible to reconsider the check or add an option to ignore the
> format which does not have a required directive? If you know a better
> alternative to the standard utility which would result in the same small
> code but great result, please suggest if possible!
> 
> Again, appreciated, and please stay safe!

This suggestion has some merit,
but there are a few ways to generate repetitive data already:

   a=10

   seq $a | xargs printf -- 'x%.0s'

   printf "%${a}s" '' | tr ' ' x

   yes x | head -n$a | tr -d '\n'

Also if only outputting to a terminal, then you can get the
repetition to happen within the terminal code like:

   printf -- "x\e[${a}b"

Therefore I'm not sure it's worth relaxing the validation in seq.

thanks,
Pádraig




Information forwarded to bug-coreutils@HIDDEN:
bug#69636; Package coreutils. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 8 Mar 2024 12:30:32 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Mar 08 07:30:32 2024
Received: from localhost ([127.0.0.1]:56989 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1riZMu-0003hV-0V
	for submit <at> debbugs.gnu.org; Fri, 08 Mar 2024 07:30:32 -0500
Received: from lists.gnu.org ([209.51.188.17]:38318)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <the.f8er@HIDDEN>) id 1riZMr-0003au-Mo
 for submit <at> debbugs.gnu.org; Fri, 08 Mar 2024 07:30:30 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <the.f8er@HIDDEN>)
 id 1riZMG-0003tR-PZ
 for bug-coreutils@HIDDEN; Fri, 08 Mar 2024 07:29:53 -0500
Received: from mail-lf1-x129.google.com ([2a00:1450:4864:20::129])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <the.f8er@HIDDEN>)
 id 1riZME-0002Ds-UR
 for bug-coreutils@HIDDEN; Fri, 08 Mar 2024 07:29:52 -0500
Received: by mail-lf1-x129.google.com with SMTP id
 2adb3069b0e04-512b3b04995so1646746e87.3
 for <bug-coreutils@HIDDEN>; Fri, 08 Mar 2024 04:29:49 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1709900988; x=1710505788; darn=gnu.org;
 h=content-transfer-encoding:subject:from:reply-to:cc:to
 :content-language:user-agent:mime-version:date:message-id:from:to:cc
 :subject:date:message-id:reply-to;
 bh=oLH8CXUSCcXFk5N5skoTS0EXOt+n4hIYAMfkqX6sGBo=;
 b=kBl3TCODmoXa6ErHJujyirkRdK1GM3vY7MuaggbUPCIyKDAMpeXKIbakUZKf+ZPj7t
 wkaleGx2F2Xk8fA3ikQgcMgqjZMBy2xmjupq5X8YWomtEQL/Qj/3TGqkDzj5zlqhCwvq
 k+fAFCBOGCUG0/3gM59i89+ICbJUnjpQXww3n3rDw8wod6/db5BDhYEosofGjmzbrxqj
 vddE6lFdu4U5wmt2laldDTvRaVZAS9ozDrFSY0hNGRKZbyeHA/GaONtEYIEPuzHYVVj0
 N9wKMdZXdxkNs3kz8RFY8qBP1u+oIR35Mm6INPZlaZhrC9c/kMvcdExlXOdWtuzN2lp6
 t0Hw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1709900988; x=1710505788;
 h=content-transfer-encoding:subject:from:reply-to:cc:to
 :content-language:user-agent:mime-version:date:message-id
 :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
 bh=oLH8CXUSCcXFk5N5skoTS0EXOt+n4hIYAMfkqX6sGBo=;
 b=xNZW2vpzO/Msa0z2uFfDApgmgb6cZVdGOficxxgdZvPQs6/HJItTA955KvyHM0ZfPF
 CmCYZu84g2cDMM1BD8NXc5mLfcJkubRNswGVEXA/Cu+Jh0yBlCN8rLNHJT+1duDqZYKD
 ZrYONck3rdsrVm/Uyyah/EzCRgyghawj2UGJRunj4rM3hZa56b1P+0QZt+/DrrcseBpR
 X3q4lSEmC74F60F/qwjAs8ZzQboQeowhVukaY1AgYuDJI5fZf5pPOTm5TUIYHQAJKPnR
 JcPkWZHiGTFu+4S1ixIFMAvefk8Fenb6pxOb6JmOYZmzbc1cs6ziVuNFmYtI4Cv8q/yv
 ktcA==
X-Gm-Message-State: AOJu0Yy2rZ6Q93O3SI9ZI+ZhGPU97BB8lAFUElzwdsnqRiEKP9gYZJyn
 P9Q26wDv5O525EY/z1S2Xr8HRWRt1t4nrZI8FTNdCLPlCdCN3z4NsL5sdL5/Lbo=
X-Google-Smtp-Source: AGHT+IGvvP5H4zKMFSw0GK9HApGlhyP6Wyku4QYxetpc3SB1BHhX2b3ob03CN9m3eFMyhOyGcINZKw==
X-Received: by 2002:a19:ac01:0:b0:513:23be:e924 with SMTP id
 g1-20020a19ac01000000b0051323bee924mr3449254lfc.59.1709900988128; 
 Fri, 08 Mar 2024 04:29:48 -0800 (PST)
Received: from [0.0.0.0] (rscu.l.dedikuoti.lt. [194.135.95.142])
 by smtp.gmail.com with ESMTPSA id
 x8-20020ac24888000000b0051339f52ab2sm2789593lfc.44.2024.03.08.04.29.47
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Fri, 08 Mar 2024 04:29:47 -0800 (PST)
Message-ID: <0e68f0b4-c48a-4d82-a407-b87b20570c49@HIDDEN>
Date: Fri, 8 Mar 2024 14:29:45 +0200
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Content-Language: en-US
To: eggert@HIDDEN
From: User <the.f8er@HIDDEN>
Subject: Re: Re: [PATCH] Improve quality of format-checking code for seq.
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Received-SPF: pass client-ip=2a00:1450:4864:20::129;
 envelope-from=the.f8er@HIDDEN; helo=mail-lf1-x129.google.com
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001,
 RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001,
 T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.3 (-)
X-Debbugs-Envelope-To: submit
Cc: bug-coreutils@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Reply-To: 877i7vyf3l.fsf@HIDDEN
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)


Jim Meyering <jim@HIDDEN> wrote:

> Paul Eggert <eggert@HIDDEN> wrote:
> > * src/seq.c (validate_format): Remove. Migrate its checks into...
> > (long_double_format): Report an error and exit if an error is found,
> > instead of returning NULL.  All callers changed.
> > Use a more-consistent format for diagnostics.
> > * tests/misc/seq: Adjust to the more-consistent format for diagnostics.
> > ---
> >  src/seq.c      |   71 
> +++++++++++++++----------------------------------------
> >  tests/misc/seq |   10 ++++----
> >  2 files changed, 25 insertions(+), 56 deletions(-)
>
> Thanks.
> As far as I can see this is a "no semantic change"
> patch (modulo diagnostics), and it looks fine, so I pushed it.

Dear Paul Eggert and Jim Meyering,


Thank you very much for the contribution and care! I hope you have 
awesome and cozy day!

It is a nice addition to check the format in the most and explicitly 
safe cases, I believe, however it disallows to use it in cases when you 
need to just repeat a character without ANY processing directive! For 
example, `a=10; seq -f 'x' -s '' -- "$a";` would print 10 characters "x" 
without the check added prior and significantly (or little but still) 
support development in long codes which would require explicit loops or 
additional dependencies like awesome Perl.

Is it possible to reconsider the check or add an option to ignore the 
format which does not have a required directive? If you know a better 
alternative to the standard utility which would result in the same small 
code but great result, please suggest if possible!

Again, appreciated, and please stay safe!


Best and kind regards,

Artfaith





Acknowledgement sent to 877i7vyf3l.fsf@HIDDEN:
New bug report received and forwarded. Copy sent to bug-coreutils@HIDDEN. Full text available.
Report forwarded to bug-coreutils@HIDDEN:
bug#69636; Package coreutils. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sun, 16 Feb 2025 07:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.