Date: Sun, 22 Oct 2023 16:55:33 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 274650] sh does not accept -- after -c Message-ID: <bug-274650-227-3xDwZeXH6A@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-274650-227@https.bugs.freebsd.org/bugzilla/> References: <bug-274650-227@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D274650 Benjamin Takacs <nimaje+fbz@bureaucracy.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nimaje+fbz@bureaucracy.de --- Comment #1 from Benjamin Takacs <nimaje+fbz@bureaucracy.de> --- FreeBSDs sh doesn't do any option parsing after -c, this makes accidents du= e to an unusual nammed command impossible and lead to the behaviour you observe. sh tries to run the command =C2=B4--=C2=B4 and uses =C2=B4echo $0=C2=B4 pro= viding =C2=B4arg=C2=B4 as argument. As you don't have any command named =C2=B4--=C2=B4 on your system sh report= s it with its name =C2=B4echo $0=C2=B4. That is POSIX incompatiple behaviour. I'm in favour of documenting this incompatibility and closing this report as =C2=B4Works As Intended=C2=B4 --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-274650-227-3xDwZeXH6A>