Variable Syntax Error with Bash Script (Homework)

后端 未结 5 546
轻奢々
轻奢々 2020-12-11 11:07

I\'m currently working on homework for a Unix course and I\'ve got everything else done but I just can\'t figure out what I\'ve done wrong here. I\'ve done this exact same s

5条回答
  •  暖寄归人
    2020-12-11 11:37

    Have a look at:

    input = "$(1)"
    

    You notice the spaces around the equal sign (=)? This is not allowed in bash. It has to be

    input="$(1)"
    

    instead.

提交回复
热议问题