Users browsing this thread: 1 Guest(s)
mattrose
Members
(12-11-2020, 03:48 PM)jkl Wrote:
(12-11-2020, 02:57 PM)stratex Wrote: you know that in GNU/Linux /bin/sh is a symlink to /bin/bash in 99% of distros.

Name your source. I doubt that.

In debian and all of it's derivatives, except for ubuntu 18 and up, Redhat and all of it's derivatives, and Arch and all of it's derivatives /bin/sh is a symlink to /bin/bash. If it's not 99% it's because there aren't enough linux distros.

(12-11-2020, 02:57 PM)stratex Wrote: I thought, why not using .bash for bash scripts, and .sh for posix compliant ones.

(12-11-2020, 03:48 PM)jkl Wrote: That’s why the shebang exists. If /bin/sh points to a not-quite-POSIX shell, the system has a broken configuration in my opinion. Not something to be fixed in the userland.

even though /bin/sh is a symlink to /bin/bash, that doesn't mean that it behaves the same as /bin/bash, from the manpage https://linux.die.net/man/1/bash :

If bash is invoked with the name sh, it tries to mimic the startup behavior of historical versions of sh as closely as possible, while conforming to the POSIX standard as well.

Please excuse my formatting, it's my first time replying to a thread like this.


Messages In This Thread
File extensions - by stratex - 12-11-2020, 02:57 PM
RE: File extensions - by venam - 12-11-2020, 03:43 PM
RE: File extensions - by jkl - 12-11-2020, 03:48 PM
RE: File extensions - by opfez - 12-11-2020, 03:58 PM
RE: File extensions - by jkl - 12-11-2020, 04:09 PM
RE: File extensions - by venam - 12-11-2020, 04:24 PM
RE: File extensions - by pkal - 12-11-2020, 04:36 PM
RE: File extensions - by seninha - 12-11-2020, 04:36 PM
RE: File extensions - by stratex - 12-11-2020, 04:56 PM
RE: File extensions - by jkl - 12-11-2020, 05:04 PM
RE: File extensions - by Dworin - 12-11-2020, 11:52 PM
RE: File extensions - by movq - 13-11-2020, 05:02 PM
RE: File extensions - by mattrose - 13-11-2020, 09:03 PM
RE: File extensions - by Dworin - 14-11-2020, 12:01 AM
RE: File extensions - by mattrose - 14-11-2020, 01:07 AM
RE: File extensions - by z3bra - 14-11-2020, 06:08 AM
RE: File extensions - by venam - 14-11-2020, 06:28 AM
RE: File extensions - by s0kx - 14-11-2020, 06:35 AM