【问题标题】:How to open a file from script which is runniing at boot time如何从启动时运行的脚本打开文件
【发布时间】:2017-03-01 05:15:46
【问题描述】:

我在 u-boot 中运行我的脚本文件。我想创建一个文件并保存我的内容。我尝试了以下,

cat > info.txt <<- "EOF"        // opening the file
echo "${mmcpart}" | tee info.txt           // adding contents
echo "${root_fs}" | tee -a info.txt
EOF

和,
echo "${mmcpart}" | tee info.txt // directly adding the contents in

文件

echo "${root_fs}" | tee -a info.txt

它不工作............谁能帮我找出来

【问题讨论】:

  • 为什么是“c”标志?这里没有 C。

标签: c shell u-boot


【解决方案1】:

u-boot不支持shell脚本语法,u-boot有hush shell,读取文件和操作环境变量可以关注this

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-07-07
    • 2021-08-22
    • 2011-04-14
    相关资源
    最近更新 更多