Getting “command not found” error in bash script

前端 未结 6 1201
鱼传尺愫
鱼传尺愫 2020-12-02 00:27

I have written a bash script that gets three paths based on input parameters and then then gets the imagename/filename in the path.

Something like:
I provide:

6条回答
  •  佛祖请我去吃肉
    2020-12-02 01:23

    The problem is that you are redefining the PATH variable where bash looks into to find the binary files if you don't use a complete path when calling.

    You should change the PATH in your bash script to MYPATH or something like that, so that it doesn't mess with the already environmental variables.

    If you don't know what the PATH variable is for you can look at wikipedia's article

提交回复
热议问题