Skip to main content
Typo fix
Source Link
Jeff Schaller
  • 68.9k
  • 35
  • 122
  • 268

source is an alias to the dot . command and the dot command is a so called special command where POSIX describes that these commands exit the whole non-interactive shell in case that an error occurs.

If you call your command via:

bash test.sh 

bash does not exit, but when you call:

bash -o posix test.sh 

it exits. So either your bash has been compiled to be POSIX compliant by default otor you did call a different shell than bash.

See http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_14 for the standard.

source is an alias to the dot . command and the dot command is a so called special command where POSIX describes that these commands exit the whole non-interactive shell in case that an error occurs.

If you call your command via:

bash test.sh 

bash does not exit, but when you call:

bash -o posix test.sh 

it exits. So either your bash has been compiled to be POSIX compliant by default ot you did call a different shell than bash.

See http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_14 for the standard.

source is an alias to the dot . command and the dot command is a so called special command where POSIX describes that these commands exit the whole non-interactive shell in case that an error occurs.

If you call your command via:

bash test.sh 

bash does not exit, but when you call:

bash -o posix test.sh 

it exits. So either your bash has been compiled to be POSIX compliant by default or you did call a different shell than bash.

See http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_14 for the standard.

added 108 characters in body
Source Link
schily
  • 19.8k
  • 5
  • 42
  • 61

source is an alias to the dot . command and the dot command is a so called special command where POSIX describes that these commands exit the whole non-interactive shell in case that an error occurs.

If you call your command via:

bash test.sh 

bash does not exit, but when you call:

bash -o posix test.sh 

it exits. So either your bash has been compiled to be POSIX compliant by default ot you did call a different shell than bash.

See http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_14 for the standard.

source is an alias to the dot . command and the dot command is a so called special command where POSIX describes that these commands exit the whole non-interactive shell in case that an error occurs.

If you call your command via:

bash test.sh 

bash does not exit, but when you call:

bash -o posix test.sh 

it exits. So either your bash has been compiled to be POSIX compliant by default ot you did call a different shell than bash.

source is an alias to the dot . command and the dot command is a so called special command where POSIX describes that these commands exit the whole non-interactive shell in case that an error occurs.

If you call your command via:

bash test.sh 

bash does not exit, but when you call:

bash -o posix test.sh 

it exits. So either your bash has been compiled to be POSIX compliant by default ot you did call a different shell than bash.

See http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_14 for the standard.

Source Link
schily
  • 19.8k
  • 5
  • 42
  • 61

source is an alias to the dot . command and the dot command is a so called special command where POSIX describes that these commands exit the whole non-interactive shell in case that an error occurs.

If you call your command via:

bash test.sh 

bash does not exit, but when you call:

bash -o posix test.sh 

it exits. So either your bash has been compiled to be POSIX compliant by default ot you did call a different shell than bash.