[Bug 282714] /bin/sh doesn't report line numbers correctly when run with PS4

From: <bugzilla-noreply_at_freebsd.org>
Date: Tue, 12 Nov 2024 18:28:16 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=282714

            Bug ID: 282714
           Summary: /bin/sh doesn't report line numbers correctly when run
                    with PS4
           Product: Base System
           Version: 14.1-STABLE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Many People
          Priority: ---
         Component: bin
          Assignee: bugs@FreeBSD.org
          Reporter: yuri@freebsd.org

Created attachment 255121
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=255121&action=edit
test.sh

When run with the PS4='Line ${LINENO}: ' environment variable sh prints all
line numbers as 1.

Please run the attached test.sh to reproduce the problem.

-- 
You are receiving this mail because:
You are the assignee for the bug.