From mboxrd@z Thu Jan 1 00:00:00 1970 From: Albert ARIBAUD Date: Mon, 22 Jul 2013 13:29:41 +0200 Subject: [U-Boot] [U-boot] shell script syntax In-Reply-To: References: <20130722122458.2d5340f2@lilith> Message-ID: <20130722132941.1d0c0f95@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:06:33 +0800, wrote: > Hi, Albert: > >See the Denx U-Boot documentation, more precisely: > >http://www.denx.de/wiki/view/DULG/CommandLineParsing#Section_14.2.17. > From this web page, it seems hush-shell support "for" iteration. > So, i wrote a simple script as below: > for(i=1;i<10;i++) > do > echo "lion-0722" > done > > Then, i used mkimage tool to produce a script. > Then, i load it to dram, and run it with autoscr cmd. > But failed, the log message is: > LION # fatload mmc 0:1 0 scriptcmd0722 > reading scriptcmd0722 > 120 bytes read > LION # autoscr 0 > ## Executing script at 00000000 > Unknown command 'for(i=1' - try 'help' > Unknown command 'i<10' - try 'help' > Unknown command 'i++)' - try 'help' > syntax error > syntax error > ... ... Did you try the commands live in your U-Boot console? Did you make sure hush shell is enabled in your U-boot? > Best wishes, Amicalement, -- Albert.