inadvertently
when replacing with a Bash scriptfoo="bar"
I wrote =
with spaces before and after oo
, but the foo
was not replaced and the error did not occur.
Using the same description on an interactive bash shell
bash:foo:command not found
It's an error, but why don't you throw up the error in the script?
bash
I wrote the variable name foo
in the question.
In an environment where there were no errors, the variable name used the name basename
as the command.
The command not found
error did not appear, and it seemed to be treated as a variable with a blank string after the substitute line.
I have posted an answer to close the question, although it contains information that was not included in the question.
I don't need any space when I replace it with bash.Run line by line, so if you write foo="bar", you execute the foot command, where = and "bar" are arguments.Without the foo command, the command not found error appears.
It looks like ls-la./.If ls is changed to sdfsdfsdf, sdfsdf-la. / Same, command not found error should appear.
© 2025 OneMinuteCode. All rights reserved.