On Sun, Nov 28, 2021, at 4:01 AM, Alex fxmbsw7 Ratchev wrote:
> printf 'e=. ; (( $# > 1 )) && $e afile "${@:1:$# -1}"' >afile ; . afile 1 2
> 3
>
> bash: : command not found
>
>
> 1. the cmd=. works out, no command error
> 2. on second+ run it shows this error, as bin/. is no command in $PATH
> 3. the command is not '' anyway its .
>
> 4. the first run is np, why, $e = . and then '.' is no bin command, why
> does bash run it without an eval
> 5. why doesnt it on later runs

I can't reproduce this.

    % PS1='$ ' PS2='+ ' bash --norc; rm -f afile
    $ printf '%s\n' "$BASH_VERSION"
    5.1.8(1)-release
    $ printf 'e=. ; (( $# > 1 )) && $e afile "${@:1:$# -1}"' >afile
    $ . afile 1 2 3
    $ . afile 1 2 3
    $ . afile 1 2 3

-- 
vq

Reply via email to