From unknown Thu Jun 19 14:02:06 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#77180 <77180@debbugs.gnu.org> To: bug#77180 <77180@debbugs.gnu.org> Subject: Status: seq incorrectly(?) pads output when last parameter magnitude larger than last printed number Reply-To: bug#77180 <77180@debbugs.gnu.org> Date: Thu, 19 Jun 2025 21:02:06 +0000 retitle 77180 seq incorrectly(?) pads output when last parameter magnitude = larger than last printed number reassign 77180 coreutils submitter 77180 Nicolas Boichat severity 77180 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 22 10:57:53 2025 Received: (at submit) by debbugs.gnu.org; 22 Mar 2025 14:57:53 +0000 Received: from localhost ([127.0.0.1]:44553 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tw0IL-0005AK-AT for submit@debbugs.gnu.org; Sat, 22 Mar 2025 10:57:53 -0400 Received: from lists.gnu.org ([2001:470:142::17]:52766) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tvz7t-0006Ko-MG for submit@debbugs.gnu.org; Sat, 22 Mar 2025 09:43:02 -0400 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 ) id 1tvz7n-0000bt-Tq for bug-coreutils@gnu.org; Sat, 22 Mar 2025 09:42:56 -0400 Received: from mail-il1-f179.google.com ([209.85.166.179]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tvz7m-0004DN-2b for bug-coreutils@gnu.org; Sat, 22 Mar 2025 09:42:55 -0400 Received: by mail-il1-f179.google.com with SMTP id e9e14a558f8ab-3cf8e017abcso11947445ab.1 for ; Sat, 22 Mar 2025 06:42:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742650972; x=1743255772; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=IGVF8iTZOt8jQal4qeqkKlUJmlSLObKnIB4IObKUU7A=; b=rLLtnSlpFoD7g1sK8UGaPGZj2CdkvGApEun54cv7ypchHxsQx6ZrqrhodsoncmFk1D g1+PUXT4dglaTW/zp/V49cmbFMbzse43b3w9/4bQ2HgzNP9SOqkQLXncp+QZmofola9u /YeN3if3ESRiz3xXcMbiTNs8DTW8W9oDbPK0B37zKtP3pCx70nX7xs7WVYCBj3E/uZ2l sDzhouU4nrLi2HVxWKHax0eC/iY+70zMOwsYUKKm1tA4CYOUqv03uY2ghjXAOsOgu7/q aE0aQp7l0HWKAiPVvunBxt9oDN8QYYZq0Maf5Aky3q9xyUNVsZN83Sjn87G+N8huW/4I cGkQ== X-Gm-Message-State: AOJu0Yzsq+/2boRHe6DwIkiNxZ+sdbRDOji1iNzWOdXjJ0t7ElGpOBvN yYPGUuXgfi7x34OH9+3KMRpZpbUR8UPRA0584X3RHd9VbUzlluK4V8quipMLv0me+fLg9fEwPXk LflCq2rYLVPlreQs14zI6Fw0uev0IUSV5Bw4= X-Gm-Gg: ASbGnctiUJRooHAKWr8Qn97vZ6Jp7Dy2hmqSfiya1ypT03xgDw+fa/TOsxM0eMw/az5 pmrqmFEYEhzD6hWawXyZ5rIBWX32X97RA95gXo8tqLylPD415eiPmjMgtgg0M3dWBX+QF+yVHFe WzCvV0lzlj3rNROaUIDrSN5eHC X-Google-Smtp-Source: AGHT+IETujvTWx4vHyMqDRCws8rqDYwb11Y/oMM6sMS13Iz1ZVDYZ9k/zPHR7JfzObFvEkShTAyiGrLeJTlVx82Pi3w= X-Received: by 2002:a05:6e02:388d:b0:3d3:f775:cec0 with SMTP id e9e14a558f8ab-3d59617bf0fmr79137885ab.22.1742650972304; Sat, 22 Mar 2025 06:42:52 -0700 (PDT) MIME-Version: 1.0 From: Nicolas Boichat Date: Sat, 22 Mar 2025 14:42:41 +0100 X-Gm-Features: AQ5f1JqCQ0W95_hVBEV1otWwzmQGjDXxOqX6ZXTy5Es6zlWWOnhY7YyQ3Pffnqc Message-ID: Subject: seq incorrectly(?) pads output when last parameter magnitude larger than last printed number To: bug-coreutils@gnu.org Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=209.85.166.179; envelope-from=nicolas.boichat@gmail.com; helo=mail-il1-f179.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Sat, 22 Mar 2025 10:57:48 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Hi, (retry sending without multipart/alternative) Version: seq (GNU coreutils) 9.6; OS: Archlinux, x86-64 When adding `-w` parameter, we want numbers to be padded with leading 0s, e.g. this looks correct: $ seq -w 0 5 10 00 05 10 However, the behaviour is perhaps incorrect when the last printed number magnitude is lower than the last parameter, e.g: $ seq -w 0 6 10 00 06 would probably be more correct with this output: 0 6 The manual makes no promise about this ("Print all numbers with the same width, by padding with leading zeros"), but it's still a bit odd to add a superfluous 0. Also, it is especially confusing because, on the other hand, the precision of the last parameter is ignored, as if it was just a bound that played no role in formatting: $ seq 0 5 10.00001 0 5 10 While $ seq 0.0000 5 10 0.0000 5.0000 10.0000 Side note, a solution would also need to make sure that this still works: $ seq -w 0 5 12 00 05 10 Thanks, Nicolas