syntax of for loop in linux shell scripting

前端 未结 4 1766
故里飘歌
故里飘歌 2020-12-03 05:39

I have a problem implementing a for loop. I get this error when I execute my script

test1.sh: 2: Syntax error: Bad for loop variable

4条回答
  •  渐次进展
    2020-12-03 05:50

    What does

    ls -l /bin/sh
    

    give on your machine ?

    Make sh a symbolic link to bash and then you can do sh ./test1.sh

提交回复
热议问题