Hi,
On 07.08.2017 21:38, Chet Ramey wrote:
On 8/7/17 10:32 AM, Reto wrote:
Hi,
Not sure if it's a bug or intended behavior, but in bash 4.4 the behavior
changed with respect to builtin command 'command', called with /bin/sh.
When in Posix mode, bash doesn't allow fun
cho FOO;}; bg'
FOO
bash4.4.12# /bin/bash -c 'bg(){ echo FOO;}; bg'
FOO
bash4.4.12# /bin/sh -c 'exec(){ echo FOO;}; exec'
/bin/sh: `exec': is a special builtin
bash4.4.12# /bin/bash -c 'exec(){ echo FOO;}; exec'
FOO
bash4.4.12# /bin/sh -c 'command(){ echo FOO;}; command'
/bin/sh: `command': is a special builtin
bash4.4.12# /bin/bash -c 'command(){ echo FOO;}; command'
FOO
bash4.4.12#
regards
Reto