Simple bash script; what's wrong with this syntax?

前端 未结 3 1463
后悔当初
后悔当初 2021-01-24 08:51

I\'m reading bash script tutorials and this seems like it should work, but I clearly am missing something:

isframecount=0
framecount=0
while read p; do
  if [\"$         


        
3条回答
  •  灰色年华
    2021-01-24 09:26

    if [ "$isframecount" -eq 0 ]
    

    Spaces are required on both sides of the square brackets.

    isframecount=1
    

    No dollar sign, no spaces around = in an assignment statement.

提交回复
热议问题