
正文
U-Boot shell脚本语法
提示:扫一扫查出行【扫一扫了解最新限行尾号】
复制提示
/**********************************************************************
* U-Boot shell脚本语法
* 说明:
* 之前每次看U-Boot的环境变量,里面经常有if、while、for,就当Linux
* Shell脚本来用,也没去找文档看看。
*
* 2018-7-16 深圳 宝安西乡 曾剑锋
*********************************************************************/ 一、参考文档:
. U-Boot Scripts
http://www.compulab.co.il/utilite-computer/wiki/index.php/U-Boot_Scripts
. 14.2.. How the Command Line Parsing Works
http://www.denx.de/wiki/view/DULG/CommandLineParsing#Section_14.2.17. 二、主要条件流控语法:
. if <condition>; then <command list>; [ elif <condition>; then <command list>; ] ... [ else <command list>; ] fi
. while <condition>> ; do <command list> ; done
. until <condition> ; do <command list> ; done
. for <name> in <word list> ; do <command list> ; done







