From unknown Tue Jun 24 05:10:12 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#66713 <66713@debbugs.gnu.org> To: bug#66713 <66713@debbugs.gnu.org> Subject: Status: Expr substr on plus symbol Reply-To: bug#66713 <66713@debbugs.gnu.org> Date: Tue, 24 Jun 2025 12:10:12 +0000 retitle 66713 Expr substr on plus symbol reassign 66713 coreutils submitter 66713 petabaud51 severity 66713 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 23 16:53:39 2023 Received: (at submit) by debbugs.gnu.org; 23 Oct 2023 20:53:39 +0000 Received: from localhost ([127.0.0.1]:51992 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qv1vd-0001JZ-Lq for submit@debbugs.gnu.org; Mon, 23 Oct 2023 16:53:39 -0400 Received: from lists.gnu.org ([2001:470:142::17]:47448) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qv10p-0002mZ-5U for submit@debbugs.gnu.org; Mon, 23 Oct 2023 15:54:56 -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 1qv10F-0005NQ-Ky for bug-coreutils@gnu.org; Mon, 23 Oct 2023 15:54:19 -0400 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qv10E-0002he-8t for bug-coreutils@gnu.org; Mon, 23 Oct 2023 15:54:19 -0400 Received: by mail-wr1-x431.google.com with SMTP id ffacd0b85a97d-32dff202b4bso810105f8f.1 for ; Mon, 23 Oct 2023 12:54:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1698090856; x=1698695656; darn=gnu.org; h=content-transfer-encoding:disposition-notification-to:subject:from :to:user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to; bh=HeuDpKujioUDeOyT+GPmUfun/Vi0eWMlGKnHlYLkiK0=; b=EkAKxhvpCEUuyKoRV+sIHyU7/NPAovHrho02DYhD4sZzcc4sp+IIWWq3QSh8m42FJ2 8nPuX394RrSoCRWipRLWe2vGZ9F5in/Me0WwQyPKtgsqAOd5rQqVtN/MDv3jatRbOBgP ouYiPJcEcWywO25KNOXUNDqb+8udlTw9xRt3HfsfPesIbNFNRCtZiQxAArLD1OIHENhl sbNO9zgOMvpOydk6hdqAkFMmeAqtF4aEhY79LO2v+MoMA4UxMb2zK5Xaclu0Fc2GuHIR +mhygJ/qlAA3CtG6HOnVuQhRVot95wmn4YXz7wXkJaHk46K8cK73TsQe6VAMMaHRdhcC NZaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698090856; x=1698695656; h=content-transfer-encoding:disposition-notification-to:subject:from :to:user-agent:mime-version:date:message-id:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=HeuDpKujioUDeOyT+GPmUfun/Vi0eWMlGKnHlYLkiK0=; b=tQyz6q0Zs053yL1iXU+Y7SHbd212y0Tv26Bo4xyeBneuNzwEemZ4ivu6uX3lfchXrp 3i04Y72yH/lIsk7IMQ3FI5jU9OrB+OaqhggWZt3fzio1O24hFtcBC7xDAkdFYMRZGjbv RLHEZFa2GY1Ol8gz8MS0BHHaqeSSktiHnO4rKFQ19Q0G5h90AM3eDkHSx9QhzvmFjUKr K29Dxhv3oPoNa6N5+ZK+tQrH5u+USXPWcQPHsmJivVN7Ci3Sxm1b45VM3kKDMjbYjxYf vPw0i7iYYgLIbk9a7hlsGI2T9Nv8wPtev7GUM5kvz4HiXhrvMC9MX12sHI9590UVEV9N C03Q== X-Gm-Message-State: AOJu0YzmkwiBOuvlWEHCco0Zi+NOPSLiqnxa6TXcH2aY4vhKNdmCWqnk QjWJfsbZzsxZW7NARYsXgmKbtfeeG80jQw== X-Google-Smtp-Source: AGHT+IH3ZS7shYXeK5j7rQSlcSX/uQkKnNwWuF1Q2OEenObCxGzu18eV0u71KTlCcPBO6gRz7aDJVg== X-Received: by 2002:adf:e742:0:b0:32d:bbed:a08e with SMTP id c2-20020adfe742000000b0032dbbeda08emr9187077wrn.70.1698090856053; Mon, 23 Oct 2023 12:54:16 -0700 (PDT) Received: from ?IPV6:2001:818:eade:6b00:fc8c:ca27:8c88:9981? ([2001:818:eade:6b00:fc8c:ca27:8c88:9981]) by smtp.gmail.com with ESMTPSA id c14-20020adfe74e000000b0032d72f48555sm8410491wrn.36.2023.10.23.12.54.14 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 23 Oct 2023 12:54:15 -0700 (PDT) Message-ID: Date: Mon, 23 Oct 2023 20:54:08 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.1 To: bug-coreutils@gnu.org From: petabaud51 Subject: Expr substr on plus symbol Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::431; envelope-from=petabaud51@gmail.com; helo=mail-wr1-x431.google.com X-Spam_score_int: -13 X-Spam_score: -1.4 X-Spam_bar: - X-Spam_report: (-1.4 / 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_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, GB_FREEMAIL_DISPTO=0.499, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.7 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Greetings, I'm not sure if this is the intended UNIX/POSIX behaviour, but on: < expr substr a 1 2 , I get: > a , which is right, but on: < expr substr + 1 2 I get: > expr: syntax error: missing argume [...] Content analysis details: (1.7 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (petabaud51[at]gmail.com) -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit (petabaud51[at]gmail.com) 0.5 GB_FREEMAIL_DISPTO Disposition-Notification-To/From or Disposition-Notification-To/body contain different freemails X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Mon, 23 Oct 2023 16:53:36 -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.2 (/) Greetings, I'm not sure if this is the intended UNIX/POSIX behaviour, but on: < expr substr a 1 2 , I get: > a , which is right, but on: < expr substr + 1 2 I get: > expr: syntax error: missing argument after ‘2’ On expr "$line_of_text" 1 2, this error is thrown if the line is a simple '+'. A real-world scenario is getting the first character of each line in bulk, crashing if the line is '+'. < expr --version > expr (GNU coreutils) 8.32 -- From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 23 17:38:06 2023 Received: (at control) by debbugs.gnu.org; 23 Oct 2023 21:38:06 +0000 Received: from localhost ([127.0.0.1]:52063 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qv2cf-0005DA-Po for submit@debbugs.gnu.org; Mon, 23 Oct 2023 17:38:06 -0400 Received: from mail.cs.ucla.edu ([131.179.128.66]:44672) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qv2ce-0005CO-EG for control@debbugs.gnu.org; Mon, 23 Oct 2023 17:38:05 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id D11AA3C00FB13 for ; Mon, 23 Oct 2023 14:37:29 -0700 (PDT) Received: from mail.cs.ucla.edu ([127.0.0.1]) by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id 1K5oslOvpEoK for ; Mon, 23 Oct 2023 14:37:29 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id 8DC823C00D1D2 for ; Mon, 23 Oct 2023 14:37:29 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.cs.ucla.edu 8DC823C00D1D2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cs.ucla.edu; s=9D0B346E-2AEB-11ED-9476-E14B719DCE6C; t=1698097049; bh=vMSNTOlXpfuQDQOqKikjTW+60K0uizJSg2N+E+equuE=; h=Message-ID:Date:MIME-Version:To:From; b=GZxw4aibBCVif/mss062Auv6GZfjnh4ReLBNaLXND6c0viQgtoWGdHjBPZL2mGbPy u4xIkLnwOp0TrpYBO5T+4va13zMkqoLF4a22PKoe23OSQquy4rB+RoZRr0KyE+LdmB EuRaxVHGywWuaG7JvOE2TF/rK3b3VdixxjVSCpnDj/8yEKPYr57geVThZv58tKjTom 5y+J0w5whWj5o3az8CaUpIz9sNpMm7u+e0kZtpJizCdDGcngIk3HlLn/4G8kNV3ryi sdnko4FShn9t3hIn7nTViBmtXPrFrdEXoj44TTNjG+Cu0sUX3SDD6Dpizb4hP/Dg/M 7MUINRrlTFbIQ== X-Virus-Scanned: amavisd-new 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]) (amavisd-new, port 10026) with ESMTP id pnR-N-oJOMnJ for ; Mon, 23 Oct 2023 14:37:29 -0700 (PDT) Received: from [131.179.64.200] (Penguin.CS.UCLA.EDU [131.179.64.200]) by mail.cs.ucla.edu (Postfix) with ESMTPSA id 668EB3C00FB13 for ; Mon, 23 Oct 2023 14:37:29 -0700 (PDT) Message-ID: Date: Mon, 23 Oct 2023 14:37:29 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US To: GNU bug control From: Paul Eggert Subject: 66713+66714 not a bug Organization: UCLA Computer Science Department Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control 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: -1.0 (-) merge 66713 66714 close 66713 From unknown Tue Jun 24 05:10:12 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 21 Nov 2023 12:24:07 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator