why subtraction return - symbol

前端 未结 2 438
既然无缘
既然无缘 2021-01-28 15:40

I have a problem with a simple subtraction but I don\'t understand what\'s wrong.

My code :

start= date +%s%N | cut -b1-13
#Treatment...
end= date +%s%N         


        
2条回答
  •  忘掉有多难
    2021-01-28 16:05

    You didn't assign to the variables. You must not have spaces around the equals sign.

    Also, you're doing it wrong.

    start=$(date +%s%N | cut -b1-13)
    

提交回复
热议问题