From mboxrd@z Thu Jan 1 00:00:00 1970 From: Albert ARIBAUD Date: Mon, 22 Jul 2013 14:05:16 +0200 Subject: [U-Boot] [U-boot] shell script syntax In-Reply-To: References: <20130722132941.1d0c0f95@lilith> Message-ID: <20130722140516.34427245@lilith> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi TigerLiu at viatech.com.cn, On Mon, 22 Jul 2013 19:44:18 +0800, wrote: > Hi, Albert: > >Did you try the commands live in your U-Boot console? > >Did you make sure hush shell is enabled in your U-boot? > I am sure I have enabled hush shell. > > I think "for" iteration syntax is error: > "for(i=1;i<10;i++)" > > But I don't know how to write it correctly! This is why I suggested that you experiment in your U-Boot console, where you can quickly try things. One thing I'd test first is whether your C-like use of 'for' is valid at all for Hush, or for Bourne shell (from which Hush derives IIUC) -- I suspect it might not be. > Best wishes, Amicalement, -- Albert.