How to copy an array in Bash?

后端 未结 8 1923
陌清茗
陌清茗 2020-12-02 15:31

I have an array of applications, initialized like this:

depends=$(cat ~/Depends.txt)

When I try to parse the list and copy it to a new arra

8条回答
  •  暖寄归人
    2020-12-02 15:53

    I've discovered what was wrong.. My if isn't installed test is two for loops that remove excess characters from file names, and spits them out if they exist on a certain web server. What it wasn't doing was removing a trailing hyphen. So, when it tested it online for availability, they were parsed out. Because "file" exists, but "file-" doesn't.

提交回复
热议问题