well no idea printf 'e=. ; (( $# > 1 )) && $e afile "${@:1:$# -1}"' >afile ; set -x ; . afile 1 2 3 4 ; set +x + . afile 1 2 3 4 ++ e=. ++ (( 4 > 1 )) ++ '' afile 1 2 3 bash: : command not found + set +x
just as in my bashrc'd bashlink stuff, when its loaded it shows so and has (had) the same error again the workaround is eval "$e" if u cant reproduce it, dunno what else than close it On Wed, Dec 1, 2021, 08:01 Alex fxmbsw7 Ratchev <fxmb...@gmail.com> wrote: > im not sure i understand > > this did happen on my bashlink project ( as bashrc etc ) and this example, > but with --norc it works > > i dunno where to set -x > > changing $e to eval "$e" makes it work > but weird that error appears > i have no empty aliases i think > also eval "$e" makes it work so, .. > > im sorry to not understand.. > > i till i experienced --norc worked, thought, bash doesnt exexute . as var > cause its a bash command, and eval is needed > just on the second+ runs it showed this ( also the var wasnt empty , .. ) > > sorry again for your efforts > > ill try set -x on this piece of code but i dont expect any results > > > On Wed, Dec 1, 2021, 05:30 Dale R. Worley <wor...@alum.mit.edu> wrote: > >> Alex fxmbsw7 Ratchev <fxmb...@gmail.com> writes: >> > printf 'e=. ; (( $# > 1 )) && $e afile "${@:1:$# -1}"' >afile ; . afile >> 1 2 >> > 3 >> > >> > bash: : command not found >> >> This looks like another instance where you've constructed a command >> whose first word is the empty word. Try running with "set -x" and see >> what the command lines are when they're expanded. >> >> Dale >> >