curl: (26) couldn't open file

后端 未结 6 1784
盖世英雄少女心
盖世英雄少女心 2020-12-06 00:26

I am getting this error, when I am trying to call a box api through curl.

curl: (26) couldn\'t open file

Can\'t find why! I am calling thi

6条回答
  •  醉话见心
    2020-12-06 00:42

    I had a similar problem with relative paths like @Guilherme did too. I was running my bash script with:

    bash test/script.sh
    

    However, my file was in the same directory level as the bash script and not the test directory (where I was calling bash from), so the script could not find my file.

    Solution for me:
    1. cd into /test and run bash script.sh from there
    2. Use absolute paths

提交回复
热议问题