BASH Syntax error near unexpected token 'done'

前端 未结 12 866
轮回少年
轮回少年 2020-12-01 05:52

Any idea of what the problem could be?

My code is:

#!/bin/bash
while :
do
echo \"Press [CTRL+C] to stop..\"
sleep 1
done

Saved it a

12条回答
  •  粉色の甜心
    2020-12-01 06:21

    I had same problem, but solved.

    I removed the following line in .bashrc

    alias do="docker.exe" # this line caused the problem
    

    I use WSL(windows subsystem for linux)

提交回复
热议问题