[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Question about compound_list in bash grammar
From: |
Greg Wooledge |
Subject: |
Re: Question about compound_list in bash grammar |
Date: |
Wed, 9 Dec 2020 14:42:36 -0500 |
User-agent: |
Mutt/1.10.1 (2018-07-13) |
On Wed, Dec 09, 2020 at 11:48:52PM +0530, crimson flame wrote:
> Why does the following command not work on bash CLI?
>
> *for i in {1..5}; do echo $i done*
You need a semicolon or newline before "done". As written, the word
done is simply an argument to the echo command, and your for loop is
not syntactically complete.
I'm assuming the leading and trailing asterisks are some sort of
email markup and are not part of the actual command.