Phenomenon : The output of the script executed in the Jenkins command cannot find the command, and it can be executed by logging in to the host manually.
Reason and solution : By default, Jenkins executes shell scripts using non-login mode, but the non-login mode does not load the /etc/profile file. Add the #!/bin/bash -l command to the Execute shell and modify it to login mode. To solve the problem, the -l parameter is very important.